Skip to content

Commit

Permalink
alternate formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
cbullinger committed Sep 29, 2023
1 parent 0addff6 commit 3472074
Show file tree
Hide file tree
Showing 5 changed files with 129 additions and 136 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,12 @@ class SyncTest: RealmTest() {
schema = setOf(ExampleSyncObject_List::class, ExampleSyncObject_Item::class)
)
// Define an initial subscription with queries that include
// the user's lists and incomplete items
// the user's lists with incomplete items
.initialSubscriptions{ realm ->
add(realm.query<ExampleSyncObject_List>(
"ownerId == $0", myAuthenticatedUser.id
),
add(realm.query<ExampleSyncObject_List>("ownerId == $0", myAuthenticatedUser.id),
name = "user-lists"
)
add(realm.query<ExampleSyncObject_Item>(
"complete = false"
),
add(realm.query<ExampleSyncObject_Item>("complete = false"),
name = "incomplete-items"
)
}
Expand All @@ -93,6 +89,7 @@ class SyncTest: RealmTest() {
ownerId = myAuthenticatedUser.id
items.add(ExampleSyncObject_Item().apply {
name = "Check email"
complete = false
})
}
copyToRealm(list)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,12 @@ val config =
schema = setOf(List::class, Item::class)
)
// Define an initial subscription with queries that include
// the user's lists and incomplete items
// the user's lists with incomplete items
.initialSubscriptions{ realm ->
add(realm.query<List>(
"ownerId == $0", myAuthenticatedUser.id
),
add(realm.query<List>("ownerId == $0", myAuthenticatedUser.id),
name = "user-lists"
)
add(realm.query<Item>(
"complete = false"
),
add(realm.query<Item>("complete = false"),
name = "incomplete-items"
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ realm.write {
ownerId = myAuthenticatedUser.id
items.add(Item().apply {
name = "Check email"
complete = false
})
}
copyToRealm(list)
Expand Down
Loading

0 comments on commit 3472074

Please sign in to comment.