diff --git a/submodules/ChatListUI/Sources/Node/ChatListNode.swift b/submodules/ChatListUI/Sources/Node/ChatListNode.swift index 52348dde50..da6540e885 100644 --- a/submodules/ChatListUI/Sources/Node/ChatListNode.swift +++ b/submodules/ChatListUI/Sources/Node/ChatListNode.swift @@ -891,6 +891,8 @@ public final class ChatListNode: ListView { private var visibleTopInset: CGFloat? private var originalTopInset: CGFloat? + let hideArhiveIntro = ValuePromise(false, ignoreRepeated: true) + public init(context: AccountContext, location: ChatListControllerLocation, chatListFilter: ChatListFilter? = nil, previewing: Bool, fillPreloadItems: Bool, mode: ChatListNodeMode, theme: PresentationTheme, fontSize: PresentationFontSize, strings: PresentationStrings, dateTimeFormat: PresentationDateTimeFormat, nameSortOrder: PresentationPersonNameOrder, nameDisplayOrder: PresentationPersonNameOrder, animationCache: AnimationCache, animationRenderer: MultiAnimationRenderer, disableAnimations: Bool, isInlineMode: Bool) { self.context = context self.location = location @@ -1216,7 +1218,7 @@ public final class ChatListNode: ListView { let displayArchiveIntro: Signal if case .chatList(.archive) = location { - displayArchiveIntro = context.sharedContext.accountManager.noticeEntry(key: ApplicationSpecificNotice.archiveIntroDismissedKey()) + let displayArchiveIntroData = context.sharedContext.accountManager.noticeEntry(key: ApplicationSpecificNotice.archiveIntroDismissedKey()) |> map { entry -> Bool in if let value = entry.value?.get(ApplicationSpecificVariantNotice.self) { return !value.value @@ -1234,6 +1236,10 @@ public final class ChatListNode: ListView { } } } + displayArchiveIntro = combineLatest(displayArchiveIntroData, self.hideArhiveIntro.get()) + |> map { a, b -> Bool in + return a && !b + } } else { displayArchiveIntro = .single(false) }