Update Ghostgram features

This commit is contained in:
ichmagmaus 812
2026-03-07 18:15:32 +01:00
parent 1a3303b059
commit 24a7ec39d9
902 changed files with 148295 additions and 62348 deletions
@@ -104,10 +104,12 @@ func _internal_requestRecommendedChannels(account: Account, peerId: EnginePeer.I
let parsedPeers: AccumulatedPeers
var count: Int32
switch result {
case let .chats(apiChats):
case let .chats(chatsData):
let apiChats = chatsData.chats
chats = apiChats
count = Int32(apiChats.count)
case let .chatsSlice(apiCount, apiChats):
case let .chatsSlice(chatsSliceData):
let (apiCount, apiChats) = (chatsSliceData.count, chatsSliceData.chats)
chats = apiChats
count = apiCount
}
@@ -117,7 +119,7 @@ func _internal_requestRecommendedChannels(account: Account, peerId: EnginePeer.I
for chat in chats {
if let peer = transaction.getPeer(chat.peerId) {
peers.append(EnginePeer(peer))
if case let .channel(_, _, _, _, _, _, _, _, _, _, _, _, participantsCount, _, _, _, _, _, _, _, _, _, _) = chat, let participantsCount = participantsCount {
if case let .channel(channelData) = chat, let participantsCount = channelData.participantsCount {
transaction.updatePeerCachedData(peerIds: Set([peer.id]), update: { _, current in
var current = current as? CachedChannelData ?? CachedChannelData()
var participantsSummary = current.participantsSummary
@@ -167,7 +169,8 @@ func _internal_requestRecommendedApps(account: Account, forceUpdate: Bool) -> Si
let users: [Api.User]
let parsedPeers: AccumulatedPeers
switch result {
case let .popularAppBots(_, nextOffset, apiUsers):
case let .popularAppBots(popularAppBotsData):
let (nextOffset, apiUsers) = (popularAppBotsData.nextOffset, popularAppBotsData.users)
let _ = nextOffset
users = apiUsers
}