|
|
|
@ -1,9 +1,5 @@
|
|
|
|
|
package com.todoroo.astrid.service
|
|
|
|
|
|
|
|
|
|
import android.content.Context
|
|
|
|
|
import org.tasks.filters.CaldavFilter
|
|
|
|
|
import org.tasks.filters.GtasksFilter
|
|
|
|
|
import dagger.hilt.android.qualifiers.ApplicationContext
|
|
|
|
|
import org.tasks.BuildConfig
|
|
|
|
|
import org.tasks.LocalBroadcastManager
|
|
|
|
|
import org.tasks.caldav.VtodoCache
|
|
|
|
@ -16,14 +12,15 @@ import org.tasks.data.entity.CaldavAccount
|
|
|
|
|
import org.tasks.data.entity.CaldavTask
|
|
|
|
|
import org.tasks.data.entity.Task
|
|
|
|
|
import org.tasks.data.getLocalList
|
|
|
|
|
import org.tasks.filters.CaldavFilter
|
|
|
|
|
import org.tasks.filters.Filter
|
|
|
|
|
import org.tasks.filters.GtasksFilter
|
|
|
|
|
import org.tasks.preferences.Preferences
|
|
|
|
|
import org.tasks.sync.SyncAdapters
|
|
|
|
|
import org.tasks.time.DateTimeUtils2.currentTimeMillis
|
|
|
|
|
import javax.inject.Inject
|
|
|
|
|
|
|
|
|
|
class TaskMover @Inject constructor(
|
|
|
|
|
@param:ApplicationContext private val context: Context,
|
|
|
|
|
private val taskDao: TaskDao,
|
|
|
|
|
private val caldavDao: CaldavDao,
|
|
|
|
|
private val googleTaskDao: GoogleTaskDao,
|
|
|
|
@ -81,7 +78,7 @@ class TaskMover @Inject constructor(
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
suspend fun migrateLocalTasks() {
|
|
|
|
|
val list = caldavDao.getLocalList(context)
|
|
|
|
|
val list = caldavDao.getLocalList()
|
|
|
|
|
move(taskDao.getLocalTasks(), CaldavFilter(list))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|