mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-05 22:11:22 +00:00
Fix exclude muted from total count
This commit is contained in:
parent
04d3fefa71
commit
dd0b7b2b2a
@ -104,12 +104,21 @@ func chatListFilterItems(context: AccountContext) -> Signal<(Int, [(ChatListFilt
|
|||||||
var hasUnmutedUnread = false
|
var hasUnmutedUnread = false
|
||||||
if let totalState = totalStates[.root] {
|
if let totalState = totalStates[.root] {
|
||||||
for tag in tags {
|
for tag in tags {
|
||||||
if let value = totalState.absoluteCounters[tag] {
|
if filter.data.excludeMuted {
|
||||||
count += Int(value.chatCount)
|
if let value = totalState.filteredCounters[tag] {
|
||||||
}
|
if value.chatCount != 0 {
|
||||||
if let value = totalState.filteredCounters[tag] {
|
count += Int(value.chatCount)
|
||||||
if value.chatCount != 0 {
|
hasUnmutedUnread = true
|
||||||
hasUnmutedUnread = true
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if let value = totalState.absoluteCounters[tag] {
|
||||||
|
count += Int(value.chatCount)
|
||||||
|
}
|
||||||
|
if let value = totalState.filteredCounters[tag] {
|
||||||
|
if value.chatCount != 0 {
|
||||||
|
hasUnmutedUnread = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -117,12 +126,21 @@ func chatListFilterItems(context: AccountContext) -> Signal<(Int, [(ChatListFilt
|
|||||||
if !filter.data.excludeArchived {
|
if !filter.data.excludeArchived {
|
||||||
if let totalState = totalStates[Namespaces.PeerGroup.archive] {
|
if let totalState = totalStates[Namespaces.PeerGroup.archive] {
|
||||||
for tag in tags {
|
for tag in tags {
|
||||||
if let value = totalState.absoluteCounters[tag] {
|
if filter.data.excludeMuted {
|
||||||
count += Int(value.chatCount)
|
if let value = totalState.filteredCounters[tag] {
|
||||||
}
|
if value.chatCount != 0 {
|
||||||
if let value = totalState.filteredCounters[tag] {
|
count += Int(value.chatCount)
|
||||||
if value.chatCount != 0 {
|
hasUnmutedUnread = true
|
||||||
hasUnmutedUnread = true
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if let value = totalState.absoluteCounters[tag] {
|
||||||
|
count += Int(value.chatCount)
|
||||||
|
}
|
||||||
|
if let value = totalState.filteredCounters[tag] {
|
||||||
|
if value.chatCount != 0 {
|
||||||
|
hasUnmutedUnread = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user