Various Improvements

This commit is contained in:
Ilya Laktyushin
2021-11-29 03:34:24 +04:00
parent e98d60353d
commit 1d06d2c013
9 changed files with 116 additions and 27 deletions

View File

@@ -275,7 +275,7 @@ private func preparedLanguageListNodeTransition(presentationData: PresentationDa
final class LocalizationListControllerNode: ViewControllerTracingNode {
private let context: AccountContext
private var presentationData: PresentationData
private let navigationBar: NavigationBar
private weak var navigationBar: NavigationBar?
private let requestActivateSearch: () -> Void
private let requestDeactivateSearch: () -> Void
private let present: (ViewController, Any?) -> Void
@@ -314,7 +314,7 @@ final class LocalizationListControllerNode: ViewControllerTracingNode {
self.present = present
self.listNode = ListView()
self.listNode.keepTopItemOverscrollBackground = ListViewKeepTopItemOverscrollBackground(color: presentationData.theme.chatList.backgroundColor, direction: true)
self.listNode.keepTopItemOverscrollBackground = ListViewKeepTopItemOverscrollBackground(color: presentationData.theme.list.blocksBackgroundColor, direction: true)
self.listNode.accessibilityPageScrolledString = { row, count in
return presentationData.strings.VoiceOver_ScrollStatus(row, count).string
}
@@ -594,8 +594,8 @@ final class LocalizationListControllerNode: ViewControllerTracingNode {
if let strongSelf = self, let strongPlaceholderNode = placeholderNode {
if isSearchBar {
strongPlaceholderNode.supernode?.insertSubnode(subnode, aboveSubnode: strongPlaceholderNode)
} else {
strongSelf.insertSubnode(subnode, belowSubnode: strongSelf.navigationBar)
} else if let navigationBar = strongSelf.navigationBar {
strongSelf.insertSubnode(subnode, belowSubnode: navigationBar)
}
}
}, placeholder: placeholderNode)