From 0726eed1356a209163dc0a6d4cca0b7660a8437b Mon Sep 17 00:00:00 2001 From: Alex Baker Date: Thu, 30 Jul 2020 14:52:45 -0500 Subject: [PATCH] Fix sync after move --- app/src/main/java/com/todoroo/astrid/service/TaskMover.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/todoroo/astrid/service/TaskMover.kt b/app/src/main/java/com/todoroo/astrid/service/TaskMover.kt index 5d114fdd2..01bc53632 100644 --- a/app/src/main/java/com/todoroo/astrid/service/TaskMover.kt +++ b/app/src/main/java/com/todoroo/astrid/service/TaskMover.kt @@ -12,6 +12,7 @@ import org.tasks.LocalBroadcastManager import org.tasks.data.* import org.tasks.db.DbUtils.dbchunk import org.tasks.preferences.Preferences +import org.tasks.sync.SyncAdapters import java.util.* import javax.inject.Inject @@ -22,7 +23,8 @@ class TaskMover @Inject constructor( private val googleTaskDao: GoogleTaskDao, private val googleTaskListDao: GoogleTaskListDao, private val preferences: Preferences, - private val localBroadcastManager: LocalBroadcastManager) { + private val localBroadcastManager: LocalBroadcastManager, + private val syncAdapters: SyncAdapters) { suspend fun getSingleFilter(tasks: List): Filter? { val caldavCalendars = caldavDao.getCalendars(tasks) @@ -54,6 +56,7 @@ class TaskMover @Inject constructor( } taskDao.touch(tasks) localBroadcastManager.broadcastRefresh() + syncAdapters.sync() } suspend fun migrateLocalTasks() {