Skip to content

Commit

Permalink
Fix post loading state
Browse files Browse the repository at this point in the history
  • Loading branch information
BPerlakiH committed Sep 14, 2024
1 parent d4e4850 commit 02692ac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion App/CompactViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,12 @@ final class CompactViewController: UIHostingController<AnyView>, UISearchControl

navigationItemObserver = navigation.$currentItem
.receive(on: DispatchQueue.main)
.first()
.sink(receiveValue: { [weak self] currentItem in
if currentItem != .loading {
self?.navigationController?.isToolbarHidden = false
self?.navigationController?.isNavigationBarHidden = false
// listen to only the first change from .loading to something else
self?.navigationItemObserver?.cancel()
}
})

Expand Down

0 comments on commit 02692ac

Please sign in to comment.