mirror of
https://github.com/lil-org/wallet.git
synced 2025-01-04 02:24:39 +03:00
Fix floating header position
This commit is contained in:
parent
cae009859d
commit
392afa2bb2
@ -126,13 +126,13 @@ class AccountsListViewController: UIViewController, DataStateContainer {
|
||||
processInput()
|
||||
didAppear = true
|
||||
DispatchQueue.main.async { [weak self] in
|
||||
let heightBefore = self?.navigationController?.navigationBar.frame.height ?? 0
|
||||
self?.navigationController?.navigationBar.sizeToFit()
|
||||
DispatchQueue.main.async {
|
||||
if self?.initialContentOffset == nil && self?.sections.isEmpty == false {
|
||||
self?.initialContentOffset = self?.tableView.contentOffset.y
|
||||
if let selectedAccounts = self?.selectAccountAction?.selectedAccounts {
|
||||
self?.scrollToTheFirst(selectedAccounts)
|
||||
}
|
||||
let heightAfter = self?.navigationController?.navigationBar.frame.height ?? 0
|
||||
if self?.initialContentOffset == nil && self?.sections.isEmpty == false {
|
||||
self?.initialContentOffset = (self?.tableView.contentOffset.y ?? 0) + heightBefore - heightAfter
|
||||
if let selectedAccounts = self?.selectAccountAction?.selectedAccounts {
|
||||
self?.scrollToTheFirst(selectedAccounts)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user