mirror of
https://github.com/kiwix/kiwix-apple.git
synced 2025-09-08 20:01:15 -04:00
Fix not to navigate away from download details
This commit is contained in:
parent
ac30110eee
commit
48aa306b1a
@ -79,8 +79,9 @@ final class SplitViewController: UISplitViewController {
|
||||
.showDownloads
|
||||
.receive(on: DispatchQueue.main)
|
||||
.sink(receiveValue: { [weak self] _ in
|
||||
if self?.traitCollection.horizontalSizeClass == .regular {
|
||||
self?.navigationViewModel.currentItem = .downloads
|
||||
if self?.traitCollection.horizontalSizeClass == .regular,
|
||||
self?.navigationViewModel.currentItem != .downloads {
|
||||
self?.navigationViewModel.currentItem = .downloads
|
||||
}
|
||||
// the compact one is triggered in CompactViewController
|
||||
})
|
||||
|
@ -74,7 +74,9 @@ struct Library: View {
|
||||
}.onDisappear {
|
||||
hasSeenCategories = true
|
||||
}.onReceive(navigation.showDownloads) { _ in
|
||||
tabItem = .downloads
|
||||
if tabItem != .downloads {
|
||||
tabItem = .downloads
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user