Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docmostly/Features/PageReader/PageReaderDestinationView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import SwiftUI

struct PageReaderDestinationView: View {
@Environment(AppState.self) private var appState
@Environment(\.pageOpenPresentation) private var pageOpenPresentation

let pageID: String

Expand All @@ -11,6 +12,7 @@ struct PageReaderDestinationView: View {
appState.selectPage(id: pageID)
}
.onDisappear {
guard pageOpenPresentation.shouldClearSelectedPageOnReaderDisappear else { return }
appState.clearSelectedPage(ifMatching: pageID)
}
}
Expand Down
Loading