Skip to content

Commit 90b557a

Browse files
chore: use getBoolean in demo (#126)
1 parent b2e929e commit 90b557a

File tree

2 files changed

+2
-3
lines changed
  • core/src/commonMain/kotlin/com/powersync/db/internal
  • demos/supabase-todolist/shared/src/commonMain/kotlin/com/powersync/demos/powersync

2 files changed

+2
-3
lines changed

core/src/commonMain/kotlin/com/powersync/db/internal/InternalDatabaseImpl.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import kotlinx.coroutines.FlowPreview
2020
import kotlinx.coroutines.IO
2121
import kotlinx.coroutines.flow.Flow
2222
import kotlinx.coroutines.flow.debounce
23-
import kotlinx.coroutines.flow.filter
2423
import kotlinx.coroutines.flow.onEach
2524
import kotlinx.coroutines.launch
2625
import kotlinx.coroutines.sync.Mutex

demos/supabase-todolist/shared/src/commonMain/kotlin/com/powersync/demos/powersync/Todo.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import androidx.lifecycle.ViewModel
44
import androidx.lifecycle.viewModelScope
55
import co.touchlab.kermit.Logger
66
import com.powersync.PowerSyncDatabase
7-
import com.powersync.db.getLongOptional
7+
import com.powersync.db.getBoolean
88
import com.powersync.db.getString
99
import com.powersync.db.getStringOptional
1010
import kotlinx.coroutines.flow.Flow
@@ -40,7 +40,7 @@ internal class Todo(
4040
description = cursor.getString("description"),
4141
createdBy = cursor.getStringOptional("created_by"),
4242
completedBy = cursor.getStringOptional("completed_by"),
43-
completed = cursor.getLongOptional("completed") == 1L,
43+
completed = cursor.getBoolean( "completed"),
4444
listId = cursor.getString("list_id"),
4545
photoId = cursor.getStringOptional("photo_id"),
4646
)

0 commit comments

Comments
 (0)