2.1.0
⚠️ 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 requiresAvatarViewStyle
intead ofcornerRadius
andfont
#203.- Renamed #100:
ChannelPresenter.uploader
toChannelPresenter.uploadManager
,UploadItem
toUploadingItem
.
- 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 ofPaginationOption
s from now on #158.channel.subscribeToWatcherCount
uses channel events to publish updated counts and does not callchannel.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 ofURLSessionTask
to make requests and events more consistent #172. - The example project was updated #172.
- Rename
showImagePickerAuthorizationStatusAlert
toshowImagePickerAlert
#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
inChatViewController
. 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
toMessageViewStyle
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 intoChannelPresenter
#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 intoChannelPresenter
#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()
inChannelTableViewCell
andMessageTableViewCell
#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