Skip to content

Commit

Permalink
Fix state restoration edge case
Browse files Browse the repository at this point in the history
  • Loading branch information
mvasilak committed Jul 7, 2023
1 parent 76c0980 commit 25e9d11
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Zotero/Scenes/AppCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,9 @@ final class AppCoordinator: NSObject {
mainController.showItems(for: collection, in: library, isInitial: false)
} else {
DDLogInfo("AppCoordinator: show restored state - \(data.key); \(data.libraryId); \(url.relativePath)")
// Collection is missing, show all items instead
let collection = Collection(custom: .all, itemCount: 0)
mainController.showItems(for: collection, in: library, isInitial: true)
}

mainController.getDetailCoordinator { [weak self] coordinator in
Expand Down

0 comments on commit 25e9d11

Please sign in to comment.