Various fixes

This commit is contained in:
Ilya Laktyushin
2025-03-17 00:17:58 +04:00
parent 5473a8d25d
commit c529ba1c87
7 changed files with 72 additions and 77 deletions

View File

@@ -75,15 +75,8 @@ func _internal_updateChannelPaidMessagesStars(account: Account, peerId: PeerId,
return .complete()
}
account.stateManager.addUpdates(result)
return account.postbox.transaction { transaction -> Void in
transaction.updatePeerCachedData(peerIds: Set([peerId]), update: { _, cachedData in
if let cachedData = cachedData as? CachedChannelData {
return cachedData.withUpdatedSendPaidMessageStars(stars)
}
return cachedData
})
}
|> ignoreValues
return .complete()
}
}
|> switchToLatest