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 12, 2024
1 parent 69da466 commit 3b6c4b2
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 3b6c4b2

Please sign in to comment.