mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-15 15:02:49 +01:00
parent
080192a1a5
commit
5dbeda6b65
@ -41,6 +41,9 @@ import eu.kanade.tachiyomi.data.sync.SyncDataJob
|
||||
import eu.kanade.tachiyomi.data.sync.SyncManager
|
||||
import eu.kanade.tachiyomi.data.sync.service.GoogleDriveService
|
||||
import eu.kanade.tachiyomi.data.sync.service.GoogleDriveSyncService
|
||||
import eu.kanade.tachiyomi.util.storage.DiskUtil
|
||||
import eu.kanade.tachiyomi.util.system.DeviceUtil
|
||||
import eu.kanade.tachiyomi.util.system.copyToClipboard
|
||||
import eu.kanade.tachiyomi.util.system.toast
|
||||
import kotlinx.collections.immutable.persistentListOf
|
||||
import kotlinx.collections.immutable.persistentMapOf
|
||||
@ -281,6 +284,7 @@ object SettingsDataScreen : SearchableSettings {
|
||||
) + getSyncServicePreferences(syncPreferences, syncService)
|
||||
}
|
||||
|
||||
|
||||
@Composable
|
||||
private fun getSyncServicePreferences(syncPreferences: SyncPreferences, syncService: Int): List<Preference> {
|
||||
val syncServiceType = SyncManager.SyncService.fromInt(syncService)
|
||||
@ -501,4 +505,5 @@ object SettingsDataScreen : SearchableSettings {
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -130,16 +130,11 @@ class SyncManager(
|
||||
val backupUri = writeSyncDataToCache(context, newSyncData)
|
||||
logcat(LogPriority.DEBUG) { "Got Backup Uri: $backupUri" }
|
||||
if (backupUri != null) {
|
||||
BackupRestoreJob.start(
|
||||
context,
|
||||
backupUri,
|
||||
sync = true,
|
||||
options = RestoreOptions(
|
||||
BackupRestoreJob.start(context, backupUri, sync = true, options = RestoreOptions(
|
||||
appSettings = true,
|
||||
sourceSettings = true,
|
||||
library = true,
|
||||
),
|
||||
)
|
||||
))
|
||||
} else {
|
||||
logcat(LogPriority.ERROR) { "Failed to write sync data to file" }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user