Skip to content

2.1.0

Compare
Choose a tag to compare
@b-onc b-onc released this 29 Apr 11:27

⚠️ Breaking Changes

  • Set user will return a Result<UserConnection, ClientError> in callback. UserConnection has the current user data, connection id and unread count for channels and messages #182.
  • AvatarView.init changed and it requires AvatarViewStyle intead of cornerRadius and font #203.
  • Renamed #100:
    • ChannelPresenter.uploader to ChannelPresenter.uploadManager,
    • UploadItem to UploadingItem.
  • Modified signatures #100:
func sendImage(data: Data, 
               fileName: String, 
               mimeType: String, 
               channel: Channel,
               progress: @escaping Client.Progress, 
               completion: @escaping Client.Completion<URL>) -> Cancellable

func sendFile(data: Data,
              fileName: String,
              mimeType: String,
              channel: Channel,
              progress: @escaping Client.Progress,
              completion: @escaping Client.Completion<URL>) -> Cancellable
              
func deleteImage(url: URL, channel: Channel, _ completion: @escaping Client.Completion<EmptyData> = { _ in }) -> Cancellable

func deleteFile(url: URL, channel: Channel, _ completion: @escaping Client.Completion<EmptyData> = { _ in }) -> Cancellable

🔄 Changed

  • Pagination doesn't support + operator anymore, please use a set of PaginationOptions from now on #158.
  • channel.subscribeToWatcherCount uses channel events to publish updated counts and does not call channel.watch as a side-effect anymore #161.
  • Subscriptions for a channel unread count and watcher count #172.
  • Changed a returning type for requests as Cancellable instead of URLSessionTask to make requests and events more consistent #172.
  • The example project was updated #172.
  • Rename showImagePickerAuthorizationStatusAlert to showImagePickerAlert #215

✅ Added

  • Message preparation callback on ChannelPresenter to modify messages before they're sent #142.
  • The view controller for threads can now be customized by overriding createThreadViewController in ChatViewController. This is useful if you need a different style for threads. #136.
  • Better errors when developers forget to call set(user:) or don't wait for its completion #160.
  • Examples for a channel unread count and watcher count in the Example app #172.
  • Added ChatViewStyle.default #191.
  • Added ChatViewStyle.dynamic for iOS 13 to support dynamic colors for dark mode #191.
  • Added MessageViewStyle.pointedCornerRadius to make pointed corner rounded #191.
  • Added methods for AvatarView customization #203:
  • Added messageInsetSpacing to MessageViewStyle to allow control of spacing between message and container #216.
  • Added Uploader protocol. Use them to create own uploader for your file storage. Assign your uploader into ChannelPresenter #100:
presenter.uploadManager = UploadManager(uploader: customUploader)

ChannelsViewController:

open func updateChannelCellAvatarView(in cell: ChannelTableViewCell, channel: Channel)

ChatViewController:

open func updateMessageCellAvatarView(in cell: MessageTableViewCell, message: Message, messageStyle: MessageViewStyle)
open func updateFooterTypingUserAvatarView(footerView: ChatFooterView, user: User)
  • New properties for AvatarViewStyle #203:
    • placeholderTextColor: UIColor?
    • placeholderBackgroundColor: UIColor?
  • Added Uploader protocol. Use them to create own uploader for your file storage. Assign your uploader into ChannelPresenter #100:
  presenter.uploadManager = UploadManager(uploader: customUploader)

🐞 Fixed

  • SPM support #156.
  • Made SubscriptionBag.init public #172.
  • Unused RxBlocking dependency removed #177.
  • Reconnection now automatically re-watches all channels watched up to that point #178.
  • Unnecessary Gzip dependency removed #183.
  • Unnecessary Reachability dependency removed #184.
  • Flag message/user #186.
  • Discard messages from muted users #186.
  • Fix composerView hiding behind keyboard after launching from bg #188.
  • Open prepareForReuse() in ChannelTableViewCell and MessageTableViewCell #190.
  • Channel query options default to .state, in-line with documentation instead of empty #198
  • Fix the deprecation warning in the UI framework #201.
  • Fix current user's messages are counted towards unread count #206
  • Fix ImagePicker not asking for permission for avaible source types #215
  • Fix ImagePicker showing an error when no image is selected #215