Commit 0955be4 1 parent 61e0621 commit 0955be4 Copy full SHA for 0955be4
File tree 2 files changed +1
-23
lines changed
PocketKit/Sources/PocketKit
2 files changed +1
-23
lines changed Original file line number Diff line number Diff line change @@ -9,27 +9,6 @@ import CoreData
9
9
10
10
11
11
struct ItemListView : View {
12
- private let context : NSManagedObjectContext
13
- private let selection : ItemSelection
14
-
15
- init (
16
- context: NSManagedObjectContext ,
17
- selection: ItemSelection
18
- ) {
19
- self . context = context
20
- self . selection = selection
21
- }
22
-
23
- var body : some View {
24
- _ItemListView ( selection: selection)
25
- . environment ( \. managedObjectContext, context)
26
- }
27
- }
28
-
29
- private struct _ItemListView : View {
30
- @Environment ( \. source)
31
- private var source : Source
32
-
33
12
@FetchRequest ( fetchRequest: Requests . fetchItems ( ) )
34
13
var items : FetchedResults < Item >
35
14
Original file line number Diff line number Diff line change @@ -58,9 +58,8 @@ class PocketSceneCoordinator {
58
58
59
59
private func configureSplitView( ) {
60
60
let listView = ItemListView (
61
- context: source. managedObjectContext,
62
61
selection: itemSelection
63
- )
62
+ ) . environment ( \ . managedObjectContext , source . managedObjectContext )
64
63
65
64
let primaryViewController = UIHostingController ( rootView: listView)
66
65
let secondaryViewController = ItemViewController (
You can’t perform that action at this time.
0 commit comments