File tree Expand file tree Collapse file tree 5 files changed +6
-6
lines changed
commonIntegrationTest/kotlin/com/powersync
commonMain/kotlin/com/powersync
commonTest/kotlin/com/powersync/sync
demos/android-supabase-todolist/app/src/main/java/com/powersync/androidexample/screens Expand file tree Collapse file tree 5 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -177,7 +177,7 @@ class SyncIntegrationTest {
177
177
),
178
178
)
179
179
180
- turbine.waitFor { it.priorityStatusFor (priority).hasSynced == true }
180
+ turbine.waitFor { it.statusForPriority (priority).hasSynced == true }
181
181
expectUserCount(priorityNo + 1 )
182
182
}
183
183
@@ -224,7 +224,7 @@ class SyncIntegrationTest {
224
224
// Connect to the same database again
225
225
database = openDb()
226
226
assertFalse { database.currentStatus.hasSynced == true }
227
- assertTrue { database.currentStatus.priorityStatusFor (BucketPriority (1 )).hasSynced == true }
227
+ assertTrue { database.currentStatus.statusForPriority (BucketPriority (1 )).hasSynced == true }
228
228
database.close()
229
229
syncLines.close()
230
230
}
Original file line number Diff line number Diff line change @@ -342,7 +342,7 @@ internal class PowerSyncDatabaseImpl(
342
342
if (priority == null ) {
343
343
{ it.hasSynced == true }
344
344
} else {
345
- { it.priorityStatusFor (priority).hasSynced == true }
345
+ { it.statusForPriority (priority).hasSynced == true }
346
346
}
347
347
348
348
if (predicate(currentStatus)) {
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ public interface SyncStatusData {
85
85
/* *
86
86
* Status information for whether buckets in [priority] have been synchronized.
87
87
*/
88
- public fun priorityStatusFor (priority : BucketPriority ): PriorityStatusEntry {
88
+ public fun statusForPriority (priority : BucketPriority ): PriorityStatusEntry {
89
89
val byDescendingPriorities = priorityStatusEntries.sortedByDescending { it.priority }
90
90
91
91
for (entry in byDescendingPriorities) {
Original file line number Diff line number Diff line change @@ -286,7 +286,7 @@ class SyncStreamTest {
286
286
),
287
287
)
288
288
289
- turbine.waitFor { it.priorityStatusFor (priority).hasSynced == true }
289
+ turbine.waitFor { it.statusForPriority (priority).hasSynced == true }
290
290
291
291
verifySuspend(order) {
292
292
if (priorityNo == 0 ) {
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ internal fun HomeScreen(
66
66
// When giving lists a higher priority than items, we can have a consistent snapshot of
67
67
// lists without items. In the case where many items exist (that might take longer to
68
68
// sync initially), this allows us to display lists earlier.
69
- if (status.priorityStatusFor (BucketPriority (1 )).hasSynced == true ) {
69
+ if (status.statusForPriority (BucketPriority (1 )).hasSynced == true ) {
70
70
ListContent (
71
71
items = items,
72
72
onItemClicked = onItemClicked,
You can’t perform that action at this time.
0 commit comments