mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-29 11:25:38 +00:00
[WIP] hide info
This commit is contained in:
parent
143a77158b
commit
3ca3e64173
@ -891,6 +891,8 @@ public final class ChatListNode: ListView {
|
||||
private var visibleTopInset: CGFloat?
|
||||
private var originalTopInset: CGFloat?
|
||||
|
||||
let hideArhiveIntro = ValuePromise<Bool>(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<Bool, NoError>
|
||||
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)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user