mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Possibly fix unwanted users in stories feed
This commit is contained in:
parent
e8a6df7bbf
commit
dd06ff38d0
@ -59,12 +59,13 @@ public func updatePeers(transaction: Transaction, peers: [Peer], update: (Peer?,
|
||||
var (state, peerIds) = transaction.getAllStorySubscriptions(key: .filtered)
|
||||
peerIds.removeAll(where: { $0 == updated.id })
|
||||
transaction.replaceAllStorySubscriptions(key: .filtered, state: state, peerIds: peerIds)
|
||||
}
|
||||
if !transaction.storySubscriptionsContains(key: .hidden, peerId: updated.id) {
|
||||
var (state, peerIds) = transaction.getAllStorySubscriptions(key: .hidden)
|
||||
if !peerIds.contains(updated.id) {
|
||||
peerIds.append(updated.id)
|
||||
transaction.replaceAllStorySubscriptions(key: .hidden, state: state, peerIds: peerIds)
|
||||
|
||||
if !transaction.storySubscriptionsContains(key: .hidden, peerId: updated.id) {
|
||||
var (state, peerIds) = transaction.getAllStorySubscriptions(key: .hidden)
|
||||
if !peerIds.contains(updated.id) {
|
||||
peerIds.append(updated.id)
|
||||
transaction.replaceAllStorySubscriptions(key: .hidden, state: state, peerIds: peerIds)
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@ -72,12 +73,13 @@ public func updatePeers(transaction: Transaction, peers: [Peer], update: (Peer?,
|
||||
var (state, peerIds) = transaction.getAllStorySubscriptions(key: .hidden)
|
||||
peerIds.removeAll(where: { $0 == updated.id })
|
||||
transaction.replaceAllStorySubscriptions(key: .hidden, state: state, peerIds: peerIds)
|
||||
}
|
||||
if !transaction.storySubscriptionsContains(key: .filtered, peerId: updated.id) {
|
||||
var (state, peerIds) = transaction.getAllStorySubscriptions(key: .filtered)
|
||||
if !peerIds.contains(updated.id) {
|
||||
peerIds.append(updated.id)
|
||||
transaction.replaceAllStorySubscriptions(key: .filtered, state: state, peerIds: peerIds)
|
||||
|
||||
if !transaction.storySubscriptionsContains(key: .filtered, peerId: updated.id) {
|
||||
var (state, peerIds) = transaction.getAllStorySubscriptions(key: .filtered)
|
||||
if !peerIds.contains(updated.id) {
|
||||
peerIds.append(updated.id)
|
||||
transaction.replaceAllStorySubscriptions(key: .filtered, state: state, peerIds: peerIds)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user