mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
show overlay while web view loads
This commit is contained in:
parent
b6b1cdc2b2
commit
4d6c54da12
2 changed files with 17 additions and 1 deletions
|
|
@ -44,6 +44,7 @@ struct WebReaderContainerView: View {
|
|||
@State var safariWebLink: SafariWebLink?
|
||||
@State private var navBarVisibilityRatio = 1.0
|
||||
@State private var showDeleteConfirmation = false
|
||||
@State private var showOverlay = true
|
||||
@State var increaseFontActionID: UUID?
|
||||
@State var decreaseFontActionID: UUID?
|
||||
|
||||
|
|
@ -172,6 +173,21 @@ struct WebReaderContainerView: View {
|
|||
decreaseFontActionID: $decreaseFontActionID,
|
||||
annotationSaveTransactionID: nil
|
||||
)
|
||||
.overlay(
|
||||
Group {
|
||||
if showOverlay {
|
||||
Color.systemBackground
|
||||
.transition(.opacity)
|
||||
.onAppear {
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(250)) {
|
||||
withAnimation(.linear(duration: 0.2)) {
|
||||
showOverlay = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
} else {
|
||||
Color.clear
|
||||
.contentShape(Rectangle())
|
||||
|
|
|
|||
|
|
@ -15,5 +15,5 @@ public enum FeatureFlag {
|
|||
public static let enableShareButton = false
|
||||
public static let enableSnooze = false
|
||||
public static let showFeedItemTags = false
|
||||
public static let useLocalWebView = false
|
||||
public static let useLocalWebView = true
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue