Skip to content

Commit da94c08

Browse files
committed
Honor local only list update date when pushing remotely
1 parent 0916f51 commit da94c08

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tasks-core/src/commonMain/kotlin/net/opatry/tasks/data/TaskRepository.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,12 @@ class TaskRepository(
368368
private suspend fun pushLocalTaskList(localTaskList: LocalTaskList): LocalTaskList? {
369369
return withContext(Dispatchers.IO) {
370370
try {
371-
taskListsApi.insert(RemoteTaskList(localTaskList.title))
371+
taskListsApi.insert(
372+
RemoteTaskList(
373+
title = localTaskList.title,
374+
updatedDate = localTaskList.lastUpdateDate
375+
)
376+
)
372377
} catch (_: Exception) {
373378
null
374379
}

0 commit comments

Comments
 (0)