@@ -521,15 +521,15 @@ func ChatListFilterController(context: AccountContext, filter: ChatListFilter, i
521
521
var state = state
522
522
523
523
let categories = peerIds. filter {
524
- $0. namespace == ChatListFilterPeerCategories . Namespace
524
+ $0. namespace. _internalGetInt32Value ( ) == ChatListFilterPeerCategories . Namespace
525
525
}
526
526
let peerIds = Set ( peerIds) . subtracting ( categories)
527
527
528
528
state. withUpdatedFilter { filter in
529
529
var filter = filter
530
530
filter. data. includePeers. setPeers ( Array ( peerIds. uniqueElements. prefix ( maximumPeers) ) )
531
531
var updatedCats : ChatListFilterPeerCategories = [ ]
532
- let cats = categories. map { ChatListFilterPeerCategories ( rawValue: $0. id) }
532
+ let cats = categories. map { ChatListFilterPeerCategories ( rawValue: $0. id. _internalGetInt32Value ( ) ) }
533
533
for cat in cats {
534
534
updatedCats. insert ( cat)
535
535
}
@@ -553,18 +553,18 @@ func ChatListFilterController(context: AccountContext, filter: ChatListFilter, i
553
553
var filter = filter
554
554
555
555
let categories = peerIds. filter {
556
- $0. namespace == ChatListFilterPeerCategories . Namespace
556
+ $0. namespace. _internalGetInt32Value ( ) == ChatListFilterPeerCategories . Namespace
557
557
}
558
558
let peerIds = Set ( peerIds) . subtracting ( categories)
559
559
filter. data. excludePeers = Array ( peerIds. uniqueElements. prefix ( maximumPeers) )
560
560
for cat in categories {
561
- if ChatListFilterPeerCategories ( rawValue: cat. id) == . excludeMuted {
561
+ if ChatListFilterPeerCategories ( rawValue: cat. id. _internalGetInt32Value ( ) ) == . excludeMuted {
562
562
filter. data. excludeMuted = true
563
563
}
564
- if ChatListFilterPeerCategories ( rawValue: cat. id) == . excludeRead {
564
+ if ChatListFilterPeerCategories ( rawValue: cat. id. _internalGetInt32Value ( ) ) == . excludeRead {
565
565
filter. data. excludeRead = true
566
566
}
567
- if ChatListFilterPeerCategories ( rawValue: cat. id) == . excludeArchived {
567
+ if ChatListFilterPeerCategories ( rawValue: cat. id. _internalGetInt32Value ( ) ) == . excludeArchived {
568
568
filter. data. excludeArchived = true
569
569
}
570
570
}
@@ -584,8 +584,8 @@ func ChatListFilterController(context: AccountContext, filter: ChatListFilter, i
584
584
var peers = filter. data. includePeers. peers
585
585
peers. removeAll ( where: { $0 == peerId } )
586
586
filter. data. includePeers. setPeers ( peers)
587
- if peerId. namespace == ChatListFilterPeerCategories . Namespace {
588
- filter. data. categories. remove ( ChatListFilterPeerCategories ( rawValue: peerId. id) )
587
+ if peerId. namespace. _internalGetInt32Value ( ) == ChatListFilterPeerCategories . Namespace {
588
+ filter. data. categories. remove ( ChatListFilterPeerCategories ( rawValue: peerId. id. _internalGetInt32Value ( ) ) )
589
589
}
590
590
return filter
591
591
}
@@ -600,14 +600,14 @@ func ChatListFilterController(context: AccountContext, filter: ChatListFilter, i
600
600
var peers = filter. data. excludePeers
601
601
peers. removeAll ( where: { $0 == peerId } )
602
602
filter. data. excludePeers = peers
603
- if peerId. namespace == ChatListFilterPeerCategories . Namespace {
604
- if ChatListFilterPeerCategories ( rawValue: peerId. id) == . excludeMuted {
603
+ if peerId. namespace. _internalGetInt32Value ( ) == ChatListFilterPeerCategories . Namespace {
604
+ if ChatListFilterPeerCategories ( rawValue: peerId. id. _internalGetInt32Value ( ) ) == . excludeMuted {
605
605
filter. data. excludeMuted = false
606
606
}
607
- if ChatListFilterPeerCategories ( rawValue: peerId. id) == . excludeRead {
607
+ if ChatListFilterPeerCategories ( rawValue: peerId. id. _internalGetInt32Value ( ) ) == . excludeRead {
608
608
filter. data. excludeRead = false
609
609
}
610
- if ChatListFilterPeerCategories ( rawValue: peerId. id) == . excludeArchived {
610
+ if ChatListFilterPeerCategories ( rawValue: peerId. id. _internalGetInt32Value ( ) ) == . excludeArchived {
611
611
filter. data. excludeArchived = false
612
612
}
613
613
}
0 commit comments