Skip to content

Commit c437f1d

Browse files
committed
Revert "Use binding instead of wrapped value"
This reverts commit 7fc68e5.
1 parent 7fc68e5 commit c437f1d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Shared/Supporting Files/Views/FavoritesView.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import SwiftUI
1616

1717
struct FavoritesView: View {
1818
/// The editing mode of the environment.
19-
@State private var editMode: EditMode = .inactive
19+
@Environment(\.editMode) private var editMode
2020

2121
/// A Boolean value indicating whether the add favorite sheet is showing.
2222
@State private var addFavoriteSheetIsShowing = false
@@ -57,9 +57,8 @@ struct FavoritesView: View {
5757
}
5858
}
5959
}
60-
.environment(\.editMode, $editMode)
6160
.onDisappear {
62-
editMode = .inactive
61+
editMode?.wrappedValue = .inactive
6362
}
6463
}
6564
}

0 commit comments

Comments
 (0)