From 971802e8e14e6bd66db8e777ea72065ceafbcc6e Mon Sep 17 00:00:00 2001 From: Seyed Mojtaba Hosseini Zeidabadi Date: Fri, 10 Sep 2021 14:18:20 +0430 Subject: [PATCH 01/12] fix: misspellings of the vision file --- VISION.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VISION.md b/VISION.md index e071591f..b16014c4 100644 --- a/VISION.md +++ b/VISION.md @@ -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. From db9839319bfc1e88a598185d8a6a196dfc70da4b Mon Sep 17 00:00:00 2001 From: Seyed Mojtaba Hosseini Zeidabadi Date: Fri, 10 Sep 2021 14:25:14 +0430 Subject: [PATCH 02/12] fix: misspellings of code and documents inside the changelog file --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 516c558b..bcba7123 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -145,7 +145,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 @@ -254,7 +254,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. From 62ae0c65f428fb9baa8047b4b94d0ac34dc9702b Mon Sep 17 00:00:00 2001 From: Seyed Mojtaba Hosseini Zeidabadi Date: Fri, 10 Sep 2021 14:28:06 +0430 Subject: [PATCH 03/12] fix: misspellings of comments inside the bubble circle file --- Sources/Views/BubbleCircle.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Views/BubbleCircle.swift b/Sources/Views/BubbleCircle.swift index c0c276ad..c1e1637d 100644 --- a/Sources/Views/BubbleCircle.swift +++ b/Sources/Views/BubbleCircle.swift @@ -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) From 9bae6f3ec4f0aa2dd6012b21e9a4c9d07d5965ab Mon Sep 17 00:00:00 2001 From: Seyed Mojtaba Hosseini Zeidabadi Date: Fri, 10 Sep 2021 14:29:18 +0430 Subject: [PATCH 04/12] enhance: formatting of the documentation comment --- Sources/Views/AvatarView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Views/AvatarView.swift b/Sources/Views/AvatarView.swift index 6e5bd206..7e71c9e5 100644 --- a/Sources/Views/AvatarView.swift +++ b/Sources/Views/AvatarView.swift @@ -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 { From bcd0558f6b17a0aed82270981e2e1e6784feb2cd Mon Sep 17 00:00:00 2001 From: Seyed Mojtaba Hosseini Zeidabadi Date: Fri, 10 Sep 2021 14:32:55 +0430 Subject: [PATCH 05/12] fix: misspellings of comments inside the message layout delegate file --- Sources/Protocols/MessagesLayoutDelegate.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Protocols/MessagesLayoutDelegate.swift b/Sources/Protocols/MessagesLayoutDelegate.swift index 800011f6..15dca456 100644 --- a/Sources/Protocols/MessagesLayoutDelegate.swift +++ b/Sources/Protocols/MessagesLayoutDelegate.swift @@ -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 From 2d8141a70b4e028257f6999744f4dfdce60ec452 Mon Sep 17 00:00:00 2001 From: Seyed Mojtaba Hosseini Zeidabadi Date: Fri, 10 Sep 2021 14:33:50 +0430 Subject: [PATCH 06/12] fix: misspellings of comments inside the message display delegate file --- Sources/Protocols/MessagesDisplayDelegate.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/Protocols/MessagesDisplayDelegate.swift b/Sources/Protocols/MessagesDisplayDelegate.swift index 1be3798a..32e01c5f 100644 --- a/Sources/Protocols/MessagesDisplayDelegate.swift +++ b/Sources/Protocols/MessagesDisplayDelegate.swift @@ -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 From f06802f7497da007ac693a745a242a6458c3f8d5 Mon Sep 17 00:00:00 2001 From: Seyed Mojtaba Hosseini Zeidabadi Date: Fri, 10 Sep 2021 14:34:49 +0430 Subject: [PATCH 07/12] fix: misspellings of comments inside the media item file --- Sources/Protocols/MediaItem.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Protocols/MediaItem.swift b/Sources/Protocols/MediaItem.swift index 86525c3e..6c0fc432 100644 --- a/Sources/Protocols/MediaItem.swift +++ b/Sources/Protocols/MediaItem.swift @@ -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. From 0418a293537d698b4489f2c520d1396519b42718 Mon Sep 17 00:00:00 2001 From: Seyed Mojtaba Hosseini Zeidabadi Date: Fri, 10 Sep 2021 14:35:22 +0430 Subject: [PATCH 08/12] fix: misspellings of comments inside the link item file --- Sources/Protocols/LinkItem.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Protocols/LinkItem.swift b/Sources/Protocols/LinkItem.swift index d8b16a38..38ebc380 100644 --- a/Sources/Protocols/LinkItem.swift +++ b/Sources/Protocols/LinkItem.swift @@ -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 } From 69e6a1c04d9053ab2551e78efaa9a20685a971fb Mon Sep 17 00:00:00 2001 From: Seyed Mojtaba Hosseini Zeidabadi Date: Fri, 10 Sep 2021 14:36:09 +0430 Subject: [PATCH 09/12] fix: misspellings of comments inside the sender file --- Sources/Models/Sender.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Models/Sender.swift b/Sources/Models/Sender.swift index c44b8be1..14ffe379 100644 --- a/Sources/Models/Sender.swift +++ b/Sources/Models/Sender.swift @@ -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 From 05b7c4895a24b31e1a7534984545ea7f5bd5fe86 Mon Sep 17 00:00:00 2001 From: Seyed Mojtaba Hosseini Zeidabadi Date: Fri, 10 Sep 2021 14:39:19 +0430 Subject: [PATCH 10/12] fix: misspellings of the comments inside the horizontal edge insets file --- Sources/Models/HorizontalEdgeInsets.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Models/HorizontalEdgeInsets.swift b/Sources/Models/HorizontalEdgeInsets.swift index 695f4e50..93133df4 100644 --- a/Sources/Models/HorizontalEdgeInsets.swift +++ b/Sources/Models/HorizontalEdgeInsets.swift @@ -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 From 19090561c4f0e3b180f54efb1510228d96c3aa32 Mon Sep 17 00:00:00 2001 From: Seyed Mojtaba Hosseini Zeidabadi Date: Fri, 10 Sep 2021 14:40:07 +0430 Subject: [PATCH 11/12] fix: misspellings of the comments inside the avatar position file --- Sources/Models/AvatarPosition.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/Models/AvatarPosition.swift b/Sources/Models/AvatarPosition.swift index f3c11e95..bc758e4b 100644 --- a/Sources/Models/AvatarPosition.swift +++ b/Sources/Models/AvatarPosition.swift @@ -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. From 3938c3008a3fdb90febf9ed357583ec7c83a9259 Mon Sep 17 00:00:00 2001 From: Seyed Mojtaba Hosseini Zeidabadi Date: Fri, 10 Sep 2021 14:42:23 +0430 Subject: [PATCH 12/12] fix: misspellings of the code inside the link preview message size calculator file --- Sources/Layout/LinkPreviewMessageSizeCalculator.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/Layout/LinkPreviewMessageSizeCalculator.swift b/Sources/Layout/LinkPreviewMessageSizeCalculator.swift index b9af0018..d5a5a2f9 100644 --- a/Sources/Layout/LinkPreviewMessageSizeCalculator.swift +++ b/Sources/Layout/LinkPreviewMessageSizeCalculator.swift @@ -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 } }