mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-10-08 19:10:53 +00:00
added missing flags for userFull
This commit is contained in:
parent
1428d1f051
commit
9e3524019a
@ -203,6 +203,7 @@ public struct CachedUserFlags: OptionSet {
|
||||
|
||||
public static let translationHidden = CachedUserFlags(rawValue: 1 << 0)
|
||||
public static let isBlockedFromStories = CachedUserFlags(rawValue: 1 << 1)
|
||||
public static let readDatesPrivate = CachedUserFlags(rawValue: 1 << 2)
|
||||
}
|
||||
|
||||
public final class EditableBotInfo: PostboxCoding, Equatable {
|
||||
|
@ -235,6 +235,20 @@ func _internal_fetchAndUpdateCachedPeerData(accountPeerId: PeerId, peerId rawPee
|
||||
let voiceCallsAvailable = (userFullFlags & (1 << 4)) != 0
|
||||
let videoCallsAvailable = (userFullFlags & (1 << 13)) != 0
|
||||
let voiceMessagesAvailable = (userFullFlags & (1 << 20)) == 0
|
||||
let readDatesPrivate = (userFullFlags & (1 << 30)) != 0
|
||||
let translationsDisabled = (userFullFlags & (1 << 23)) != 0
|
||||
|
||||
var flags: CachedUserFlags = previous.flags
|
||||
if readDatesPrivate {
|
||||
flags.insert(.readDatesPrivate)
|
||||
} else {
|
||||
flags.remove(.readDatesPrivate)
|
||||
}
|
||||
if translationsDisabled {
|
||||
flags.insert(.translationHidden)
|
||||
} else {
|
||||
flags.remove(.translationHidden)
|
||||
}
|
||||
|
||||
let callsPrivate = (userFullFlags & (1 << 5)) != 0
|
||||
let canPinMessages = (userFullFlags & (1 << 7)) != 0
|
||||
@ -286,6 +300,7 @@ func _internal_fetchAndUpdateCachedPeerData(accountPeerId: PeerId, peerId rawPee
|
||||
.withUpdatedPremiumGiftOptions(premiumGiftOptions)
|
||||
.withUpdatedVoiceMessagesAvailable(voiceMessagesAvailable)
|
||||
.withUpdatedWallpaper(wallpaper)
|
||||
.withUpdatedFlags(flags)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user