Migrate backup & restore feature to use SAF (#1900)

* Migrate backup & restore feature to use SAF

* Remove unused imports

* Remove unused rx subject

* Remove unused dateFormatter

* Open picker to current dir

* Improve exception messages when handling DocumentFile
This commit is contained in:
Moez Bhatti
2023-01-02 11:44:03 -05:00
committed by GitHub
parent c31d38905b
commit 53b2ac2bf8
20 changed files with 365 additions and 242 deletions
@@ -18,17 +18,18 @@
*/
package com.moez.QKSMS.interactor
import android.net.Uri
import com.moez.QKSMS.repository.BackupRepository
import io.reactivex.Flowable
import javax.inject.Inject
class PerformRestore @Inject constructor(
private val backupRepo: BackupRepository
) : Interactor<String>() {
) : Interactor<Uri>() {
override fun buildObservable(params: String): Flowable<*> {
override fun buildObservable(params: Uri): Flowable<*> {
return Flowable.just(params)
.doOnNext(backupRepo::performRestore)
}
}
}