mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
fix: keep compact rail clean with my story
This commit is contained in:
parent
c8339d5644
commit
e7e40d3a90
2 changed files with 5 additions and 7 deletions
|
|
@ -1501,8 +1501,7 @@ final class ChatListControllerNode: ASDisplayNode, ASGestureRecognizerDelegate {
|
|||
var navigationHeaderPanels: AnyComponent<Empty>?
|
||||
if self.controller?.tabContainerData != nil || !panels.isEmpty {
|
||||
var tabs: AnyComponent<Empty>?
|
||||
let hasFolderTabs = (self.controller?.tabContainerData?.0.count ?? 0) > 1
|
||||
let isDesktopLikeCompactSidebar = layout.deviceMetrics.type == .tablet && layout.size.width <= 160.0 && !hasFolderTabs
|
||||
let isDesktopLikeCompactSidebar = layout.deviceMetrics.type == .tablet && layout.size.width <= 160.0
|
||||
if let tabContainerData = self.controller?.tabContainerData, tabContainerData.0.count > 1, !isDesktopLikeCompactSidebar {
|
||||
let folderFilterIndex: (ChatListFilterTabEntryId, [ChatListFilterTabEntry]) -> Int? = { id, entries in
|
||||
var index = 0
|
||||
|
|
@ -1657,9 +1656,7 @@ final class ChatListControllerNode: ASDisplayNode, ASGestureRecognizerDelegate {
|
|||
}
|
||||
}
|
||||
|
||||
let hasFolderTabs = (self.controller?.tabContainerData?.0.count ?? 0) > 1
|
||||
let isCompactAvatarRail = layout.deviceMetrics.type == .tablet && layout.size.width <= 160.0
|
||||
let isDesktopLikeCompactSidebar = isCompactAvatarRail && !hasFolderTabs
|
||||
let isDesktopLikeCompactSidebar = layout.deviceMetrics.type == .tablet && layout.size.width <= 160.0
|
||||
if isDesktopLikeCompactSidebar {
|
||||
if let navigationBarComponentView = self.navigationBarView.view as? ChatListNavigationBar.View {
|
||||
navigationBarComponentView.isHidden = true
|
||||
|
|
@ -1676,7 +1673,7 @@ final class ChatListControllerNode: ASDisplayNode, ASGestureRecognizerDelegate {
|
|||
strings: self.presentationData.strings,
|
||||
statusBarHeight: layout.statusBarHeight ?? 0.0,
|
||||
sideInset: layout.safeInsets.left,
|
||||
search: ChatListNavigationBar.Search(isEnabled: !isCompactAvatarRail),
|
||||
search: ChatListNavigationBar.Search(isEnabled: true),
|
||||
activeSearch: self.isSearchDisplayControllerActive,
|
||||
primaryContent: headerContent?.primaryContent,
|
||||
secondaryContent: headerContent?.secondaryContent,
|
||||
|
|
|
|||
|
|
@ -1145,7 +1145,8 @@ public final class StoryPeerListComponent: Component {
|
|||
unseenCount = itemSet.unseenCount
|
||||
|
||||
var composeContentOffset: CGFloat?
|
||||
if peer.id == component.context.account.peerId && collapsedState.sideAlphaFraction == 1.0 && self.scrollView.contentOffset.x < 0.0 {
|
||||
let isCompactAvatarRail = itemLayout.containerSize.width <= 120.0
|
||||
if !isCompactAvatarRail && peer.id == component.context.account.peerId && collapsedState.sideAlphaFraction == 1.0 && self.scrollView.contentOffset.x < 0.0 {
|
||||
composeContentOffset = self.scrollView.contentOffset.x * -1.0
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue