mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 09:08:52 -06:00
SyncManager: Run tasks in the same thread
This commit is contained in:
@@ -36,7 +36,6 @@ import javax.inject.*
|
|||||||
@AppScope
|
@AppScope
|
||||||
class SyncManager @Inject constructor(
|
class SyncManager @Inject constructor(
|
||||||
val preferences: Preferences,
|
val preferences: Preferences,
|
||||||
val taskRunner: TaskRunner,
|
|
||||||
val importDataTaskFactory: ImportDataTaskFactory,
|
val importDataTaskFactory: ImportDataTaskFactory,
|
||||||
val commandRunner: CommandRunner,
|
val commandRunner: CommandRunner,
|
||||||
@AppContext val context: Context
|
@AppContext val context: Context
|
||||||
@@ -46,6 +45,7 @@ class SyncManager @Inject constructor(
|
|||||||
private val tmpFile = File.createTempFile("import", "", context.externalCacheDir)
|
private val tmpFile = File.createTempFile("import", "", context.externalCacheDir)
|
||||||
private var currVersion = 1L
|
private var currVersion = 1L
|
||||||
private var dirty = true
|
private var dirty = true
|
||||||
|
private var taskRunner = SingleThreadTaskRunner()
|
||||||
|
|
||||||
private lateinit var encryptionKey: EncryptionKey
|
private lateinit var encryptionKey: EncryptionKey
|
||||||
private lateinit var syncKey: String
|
private lateinit var syncKey: String
|
||||||
|
|||||||
Reference in New Issue
Block a user