Merge pull request #1618 from MojtabaHs/master

Fix misspellings of the code and comments of the main module
This commit is contained in:
Jakub Kašpar
2021-09-16 09:05:47 +02:00
committed by GitHub
12 changed files with 18 additions and 18 deletions
+2 -2
View File
@@ -152,7 +152,7 @@ The changelog for `MessageKit`. Also see the [releases](https://github.com/Messa
### Deprecated
- Deprecated `SenderType.id` in favour of `SenderType.senderId`. This change was previously meant for 3.0.0. [#1201](https://github.com/MessageKit/MessageKit/pull/1201) by [@kinoroy](https://github.com/kinoroy)
- Deprecated `SenderType.id` in favor of `SenderType.senderId`. This change was previously meant for 3.0.0. [#1201](https://github.com/MessageKit/MessageKit/pull/1201) by [@kinoroy](https://github.com/kinoroy)
### Removed
@@ -261,7 +261,7 @@ The changelog for `MessageKit`. Also see the [releases](https://github.com/Messa
- Added customizable `accessoryView`, with a new `MessagesDisplayDelegate` function `configureAccessoryView`, and corresponding size & padding properties in `MessageSizeCalculator`. The `accessoryView` is aligned to the center of the `messageContainerView`.
[#710](https://github.com/MessageKit/MessageKit/pull/710) by [@hyouuu](https://github.com/hyouuu)
- Added a tap gesture recognition to the `accessoryView` which calls the `MessageCellDelagate` function `didTapAccessoryView(in:)`.
- Added a tap gesture recognition to the `accessoryView` which calls the `MessageCellDelegate` function `didTapAccessoryView(in:)`.
[#834](https://github.com/MessageKit/MessageKit/pull/834) by [@nathantannar4](https://github.com/nathantannar4)
- Added `additionalBottomInset` property that allows to adjust the bottom content inset automatically set on the messages collection view by the view controller.
@@ -94,9 +94,9 @@ open class LinkPreviewMessageSizeCalculator: TextMessageSizeCalculator {
}
private extension LinkPreviewMessageSizeCalculator {
private func calculateContainerSize(with attibutedString: NSAttributedString, containerSize: inout CGSize, maxWidth: CGFloat) {
guard !attibutedString.string.isEmpty else { return }
let size = labelSize(for: attibutedString, considering: maxWidth)
private func calculateContainerSize(with attributedString: NSAttributedString, containerSize: inout CGSize, maxWidth: CGFloat) {
guard !attributedString.string.isEmpty else { return }
let size = labelSize(for: attributedString, considering: maxWidth)
containerSize.height += size.height
}
}
+2 -2
View File
@@ -39,12 +39,12 @@ public struct AvatarPosition: Equatable {
case cellTrailing
/// Positions the `AvatarView` based on whether the message is from the current Sender.
/// The cell is positioned `.cellTrailling` if `isFromCurrentSender` is true
/// The cell is positioned `.cellTrailing` if `isFromCurrentSender` is true
/// and `.cellLeading` if false.
case natural
}
/// An enum representing the verical alignment for an `AvatarView`.
/// An enum representing the vertical alignment for an `AvatarView`.
public enum Vertical {
/// Aligns the `AvatarView`'s top edge to the cell's top edge.
+1 -1
View File
@@ -25,7 +25,7 @@
import Foundation
import UIKit
/// A varient of `UIEdgeInsets` that only has horizontal inset properties
/// A variant of `UIEdgeInsets` that only has horizontal inset properties
public struct HorizontalEdgeInsets: Equatable {
public var left: CGFloat
+1 -1
View File
@@ -43,7 +43,7 @@ public struct Sender: SenderType {
/// The display name of a sender.
public let displayName: String
// MARK: - Intializers
// MARK: - Initializers
public init(senderId: String, displayName: String) {
self.senderId = senderId
+1 -1
View File
@@ -31,7 +31,7 @@ public protocol LinkItem {
/// A link item needs a message to present, it can be a simple String or
/// a NSAttributedString, but only one will be shown.
/// LinkItem.text has priority over LinkeItem.attributedText.
/// LinkItem.text has priority over LinkItem.attributedText.
/// The message text.
var text: String? { get }
+1 -1
View File
@@ -34,7 +34,7 @@ public protocol MediaItem {
/// The image.
var image: UIImage? { get }
/// A placeholder image for when the image is obtained asychronously.
/// A placeholder image for when the image is obtained asynchronously.
var placeholderImage: UIImage { get }
/// The size of the media item.
@@ -144,7 +144,7 @@ public protocol MessagesDisplayDelegate: AnyObject {
/// - Returns: The LocationMessageSnapshotOptions instance with the options to customize map style.
func snapshotOptionsForLocation(message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> LocationMessageSnapshotOptions
/// Used to configure the annoation view of the map image on the given location message.
/// Used to configure the annotation view of the map image on the given location message.
///
/// - Parameters:
/// - message: A `MessageType` with a `MessageKind` case of `.location`.
@@ -178,7 +178,7 @@ public protocol MessagesDisplayDelegate: AnyObject {
/// Used to configure the audio cell UI:
/// 1. play button selected state;
/// 2. progresssView progress;
/// 2. progressView progress;
/// 3. durationLabel text;
///
/// - Parameters:
@@ -210,7 +210,7 @@ public protocol MessagesDisplayDelegate: AnyObject {
/// - Note:
/// The default value is computed like fallow:
/// 1. return the time as 0:ss if duration is up to 59 seconds (e.g. 0:03 means 0 minutes and 3 seconds)
/// 2. return the time as m:ss if duration is greater than 59 and lower than 3600 (e.g. 12:23 means 12 mintues and 23 seconds)
/// 2. return the time as m:ss if duration is greater than 59 and lower than 3600 (e.g. 12:23 means 12 minutes and 23 seconds)
/// 3. return the time as h:mm:ss for anything longer that 3600 seconds (e.g. 1:19:08 means 1 hour 19 minutes and 8 seconds)
func audioProgressTextFormat(_ duration: Float, for audioCell: AudioMessageCell, in messageCollectionView: MessagesCollectionView) -> String
@@ -188,7 +188,7 @@ public protocol MessagesLayoutDelegate: AnyObject {
/// The default implementation will return nil. You must override this method if you are using your own cell for messages with MessageType.audio.
func audioCellSizeCalculator(for message: MessageType, at indexPath: IndexPath, in messagesCollectionView: MessagesCollectionView) -> CellSizeCalculator?
/// Constact cell size calculator for messages with MessageType.contact.
/// Contact cell size calculator for messages with MessageType.contact.
///
/// - Parameters:
/// - message: The contact message
+1 -1
View File
@@ -141,7 +141,7 @@ open class AvatarView: UIImageView {
/**
Calculates the inner circle's width.
Note: Assumes corner radius cannot be more than width/2 (this creates circle).
- Note: Assumes corner radius cannot be more than width/2 (this creates circle).
*/
private func calculateTextRect(outerViewWidth: CGFloat, outerViewHeight: CGFloat) -> CGRect {
guard outerViewWidth > 0 else {
+1 -1
View File
@@ -27,7 +27,7 @@ import UIKit
/// A `UIView` subclass that maintains a mask to keep it fully circular
open class BubbleCircle: UIView {
/// Lays out subviews and applys a circular mask to the layer
/// Lays out subviews and applies a circular mask to the layer
open override func layoutSubviews() {
super.layoutSubviews()
layer.mask = roundedMask(corners: .allCorners, radius: bounds.height / 2)
+1 -1
View File
@@ -19,7 +19,7 @@ Instead, MessageKit will provide you with hooks to easily handle these situation
We will strive to support the 3 latest versions of iOS.
- **Objective-C Compatibility**:
We will not sacrifice functionality or an idiomatic Swift API to support Objective-C, but would love to improve Objective-C compatability where possible.
We will not sacrifice functionality or an idiomatic Swift API to support Objective-C, but would love to improve Objective-C compatibility where possible.
- **Layouts**:
We will favor programmatic layouts over `.xib`s where ever possible.