Various Improvements

This commit is contained in:
Ilya Laktyushin
2021-08-25 02:49:02 +03:00
parent a43d164359
commit bdc30b1888
61 changed files with 1599 additions and 294 deletions

View File

@@ -309,6 +309,6 @@ public final class CachedGroupData: CachedPeerData {
}
public func withUpdatedThemeEmoticon(_ themeEmoticon: String?) -> CachedGroupData {
return CachedGroupData(participants: self.participants, exportedInvitation: self.exportedInvitation, botInfos: self.botInfos, peerStatusSettings: self.peerStatusSettings, pinnedMessageId: self.pinnedMessageId, about: self.about, flags: self.flags, hasScheduledMessages: self.hasScheduledMessages, invitedBy: self.invitedBy, photo: self.photo, activeCall: self.activeCall, autoremoveTimeout: self.autoremoveTimeout, callJoinPeerId: callJoinPeerId, themeEmoticon: themeEmoticon)
return CachedGroupData(participants: self.participants, exportedInvitation: self.exportedInvitation, botInfos: self.botInfos, peerStatusSettings: self.peerStatusSettings, pinnedMessageId: self.pinnedMessageId, about: self.about, flags: self.flags, hasScheduledMessages: self.hasScheduledMessages, invitedBy: self.invitedBy, photo: self.photo, activeCall: self.activeCall, autoremoveTimeout: self.autoremoveTimeout, callJoinPeerId: self.callJoinPeerId, themeEmoticon: themeEmoticon)
}
}

View File

@@ -1,13 +1,22 @@
import Foundation
import Postbox
public class ForwardHideSendersNamesMessageAttribute: MessageAttribute {
public init() {
public class ForwardOptionsMessageAttribute: MessageAttribute {
public let hideNames: Bool
public let hideCaptions: Bool
public init(hideNames: Bool, hideCaptions: Bool) {
self.hideNames = hideNames
self.hideCaptions = hideCaptions
}
required public init(decoder: PostboxDecoder) {
self.hideNames = decoder.decodeBoolForKey("hideNames", orElse: false)
self.hideCaptions = decoder.decodeBoolForKey("hideCaptions", orElse: false)
}
public func encode(_ encoder: PostboxEncoder) {
encoder.encodeBool(self.hideNames, forKey: "hideNames")
encoder.encodeBool(self.hideCaptions, forKey: "hideCaptions")
}
}