mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-09-05 20:22:15 +00:00
Fixes 11.6
This commit is contained in:
parent
431fcd2496
commit
9f9bd63a4d
@ -697,8 +697,8 @@ public final class AppleStyleFoldersNode: ASDisplayNode {
|
|||||||
if !wasAdded && (itemNodePair.regular.unreadCount != 0) != (unreadCount != 0) {
|
if !wasAdded && (itemNodePair.regular.unreadCount != 0) != (unreadCount != 0) {
|
||||||
badgeAnimations[filter.id] = (unreadCount != 0) ? .in : .out
|
badgeAnimations[filter.id] = (unreadCount != 0) ? .in : .out
|
||||||
}
|
}
|
||||||
itemNodePair.regular.updateText(title: filter.title(strings: presentationData.strings), shortTitle: filter.shortTitle(strings: presentationData.strings), unreadCount: unreadCount, unreadHasUnmuted: unreadHasUnmuted, isNoFilter: isNoFilter, isSelected: false, isEditing: false, isAllChats: isNoFilter, isReordering: isEditing || isReordering, presentationData: presentationData, transition: itemNodeTransition)
|
itemNodePair.regular.updateText(title: filter.title(strings: presentationData.strings).text, shortTitle: filter.shortTitle(strings: presentationData.strings).text, unreadCount: unreadCount, unreadHasUnmuted: unreadHasUnmuted, isNoFilter: isNoFilter, isSelected: false, isEditing: false, isAllChats: isNoFilter, isReordering: isEditing || isReordering, presentationData: presentationData, transition: itemNodeTransition)
|
||||||
itemNodePair.highlighted.updateText(title: filter.title(strings: presentationData.strings), shortTitle: filter.shortTitle(strings: presentationData.strings), unreadCount: unreadCount, unreadHasUnmuted: unreadHasUnmuted, isNoFilter: isNoFilter, isSelected: true, isEditing: false, isAllChats: isNoFilter, isReordering: isEditing || isReordering, presentationData: presentationData, transition: itemNodeTransition)
|
itemNodePair.highlighted.updateText(title: filter.title(strings: presentationData.strings).text, shortTitle: filter.shortTitle(strings: presentationData.strings).text, unreadCount: unreadCount, unreadHasUnmuted: unreadHasUnmuted, isNoFilter: isNoFilter, isSelected: true, isEditing: false, isAllChats: isNoFilter, isReordering: isEditing || isReordering, presentationData: presentationData, transition: itemNodeTransition)
|
||||||
}
|
}
|
||||||
var removeKeys: [ChatListFilterTabEntryId] = []
|
var removeKeys: [ChatListFilterTabEntryId] = []
|
||||||
for (id, _) in self.itemNodePairs {
|
for (id, _) in self.itemNodePairs {
|
||||||
|
@ -18,7 +18,7 @@ public func activeAccountsAndPeers(context: AccountContext, includePrimary: Bool
|
|||||||
func accountWithPeer(_ context: AccountContext) -> Signal<(AccountContext, EnginePeer, Int32)?, NoError> {
|
func accountWithPeer(_ context: AccountContext) -> Signal<(AccountContext, EnginePeer, Int32)?, NoError> {
|
||||||
return combineLatest(context.account.postbox.peerView(id: context.account.peerId), renderedTotalUnreadCount(accountManager: sharedContext.accountManager, engine: context.engine))
|
return combineLatest(context.account.postbox.peerView(id: context.account.peerId), renderedTotalUnreadCount(accountManager: sharedContext.accountManager, engine: context.engine))
|
||||||
|> map { view, totalUnreadCount -> (EnginePeer?, Int32) in
|
|> map { view, totalUnreadCount -> (EnginePeer?, Int32) in
|
||||||
return (view.peers[view.peerId].flatMap(EnginePeer.init) ?? EnginePeer.init(TelegramUser(id: view.peerId, accessHash: nil, firstName: "IMPORTED", lastName: "\(view.peerId.id._internalGetInt64Value())", username: nil, phone: nil, photo: [], botInfo: nil, restrictionInfo: nil, flags: UserInfoFlags(), emojiStatus: nil, usernames: [], storiesHidden: nil, nameColor: nil, backgroundEmojiId: nil, profileColor: nil, profileBackgroundEmojiId: nil, subscriberCount: nil)), totalUnreadCount.0)
|
return (view.peers[view.peerId].flatMap(EnginePeer.init) ?? EnginePeer.init(TelegramUser(id: view.peerId, accessHash: nil, firstName: "IMPORTED", lastName: "\(view.peerId.id._internalGetInt64Value())", username: nil, phone: nil, photo: [], botInfo: nil, restrictionInfo: nil, flags: UserInfoFlags(), emojiStatus: nil, usernames: [], storiesHidden: nil, nameColor: nil, backgroundEmojiId: nil, profileColor: nil, profileBackgroundEmojiId: nil, subscriberCount: nil, verificationIconFileId: nil)), totalUnreadCount.0)
|
||||||
}
|
}
|
||||||
|> distinctUntilChanged { lhs, rhs in
|
|> distinctUntilChanged { lhs, rhs in
|
||||||
if lhs.0 != rhs.0 {
|
if lhs.0 != rhs.0 {
|
||||||
|
@ -591,6 +591,7 @@ public final class ChatListFilterTabContainerNode: ASDisplayNode {
|
|||||||
private var backgroundNode: NavigationBackgroundNode? = nil
|
private var backgroundNode: NavigationBackgroundNode? = nil
|
||||||
|
|
||||||
public init(inline: Bool = false, context: AccountContext) {
|
public init(inline: Bool = false, context: AccountContext) {
|
||||||
|
self.context = context
|
||||||
self.scrollNode = ASScrollNode()
|
self.scrollNode = ASScrollNode()
|
||||||
|
|
||||||
self.selectedLineNode = ASImageNode()
|
self.selectedLineNode = ASImageNode()
|
||||||
@ -600,10 +601,8 @@ public final class ChatListFilterTabContainerNode: ASDisplayNode {
|
|||||||
// MARK: Swiftgram
|
// MARK: Swiftgram
|
||||||
self.inline = inline
|
self.inline = inline
|
||||||
if self.inline {
|
if self.inline {
|
||||||
if let context = context {
|
let presentationData = context.sharedContext.currentPresentationData.with { $0 }
|
||||||
let presentationData = context.sharedContext.currentPresentationData.with { $0 }
|
self.backgroundNode = NavigationBackgroundNode(color: presentationData.theme.rootController.navigationBar.blurredBackgroundColor)
|
||||||
self.backgroundNode = NavigationBackgroundNode(color: presentationData.theme.rootController.navigationBar.blurredBackgroundColor)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
super.init()
|
super.init()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user