Various improvements

This commit is contained in:
Ilya Laktyushin
2024-10-25 19:09:31 +04:00
parent 2fa059477c
commit 3d03fc94c6
23 changed files with 917 additions and 113 deletions

View File

@@ -1116,7 +1116,9 @@ public extension TelegramEngine.EngineData.Item {
guard let view = view as? CachedPeerDataView else {
preconditionFailure()
}
if let cachedData = view.cachedPeerData as? CachedChannelData {
if let cachedData = view.cachedPeerData as? CachedUserData {
return cachedData.flags.contains(.canViewRevenue)
} else if let cachedData = view.cachedPeerData as? CachedChannelData {
return cachedData.flags.contains(.canViewRevenue)
} else {
return false