We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 82bb92a commit 7fc68e5Copy full SHA for 7fc68e5
Shared/Supporting Files/Views/FavoritesView.swift
@@ -16,7 +16,7 @@ import SwiftUI
16
17
struct FavoritesView: View {
18
/// The editing mode of the environment.
19
- @Environment(\.editMode) private var editMode
+ @State private var editMode: EditMode = .inactive
20
21
/// A Boolean value indicating whether the add favorite sheet is showing.
22
@State private var addFavoriteSheetIsShowing = false
@@ -57,8 +57,9 @@ struct FavoritesView: View {
57
}
58
59
60
+ .environment(\.editMode, $editMode)
61
.onDisappear {
- editMode?.wrappedValue = .inactive
62
+ editMode = .inactive
63
64
65
0 commit comments