mirror of
https://github.com/yogeshpaliyal/KeyPass.git
synced 2026-05-20 11:29:13 -05:00
SpotlessApply
This commit is contained in:
@@ -136,6 +136,7 @@ class BackupActivity : AppCompatActivity() {
|
||||
dialog?.dismiss()
|
||||
}.show()
|
||||
} else {
|
||||
updateItems()
|
||||
Toast.makeText(
|
||||
context,
|
||||
getString(R.string.backup_completed),
|
||||
@@ -144,9 +145,6 @@ class BackupActivity : AppCompatActivity() {
|
||||
}
|
||||
}
|
||||
}
|
||||
lifecycleScope.launch {
|
||||
updateItems()
|
||||
}
|
||||
}
|
||||
|
||||
private suspend fun updateItems() {
|
||||
|
||||
@@ -17,8 +17,7 @@ suspend fun Context?.executeAutoBackup() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fun Context?.migrateToDatastore(){
|
||||
fun Context?.migrateToDatastore() {
|
||||
this ?: return
|
||||
val work = OneTimeWorkRequestBuilder<SharedPrefMigrationWorker>().build()
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ import androidx.core.content.edit
|
||||
import androidx.datastore.preferences.core.*
|
||||
import androidx.hilt.work.HiltWorker
|
||||
import androidx.work.CoroutineWorker
|
||||
import androidx.work.Worker
|
||||
import androidx.work.WorkerParameters
|
||||
import com.yogeshpaliyal.common.utils.dataStore
|
||||
import dagger.assisted.Assisted
|
||||
@@ -42,9 +41,9 @@ class SharedPrefMigrationWorker @AssistedInject constructor(
|
||||
}
|
||||
}
|
||||
}
|
||||
}catch (e:Exception){
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
return Result.success()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user