mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
fixed #1358
This commit is contained in:
parent
4fe03e8b08
commit
0fb0c6b39f
1 changed files with 2 additions and 2 deletions
|
@ -10,10 +10,10 @@ import androidx.activity.result.ActivityResultLauncher
|
||||||
import androidx.activity.result.contract.ActivityResultContracts
|
import androidx.activity.result.contract.ActivityResultContracts
|
||||||
import androidx.fragment.app.FragmentActivity
|
import androidx.fragment.app.FragmentActivity
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty
|
import com.fasterxml.jackson.annotation.JsonProperty
|
||||||
|
import com.fasterxml.jackson.module.kotlin.readValue
|
||||||
import com.lagradost.cloudstream3.CommonActivity.showToast
|
import com.lagradost.cloudstream3.CommonActivity.showToast
|
||||||
import com.lagradost.cloudstream3.R
|
import com.lagradost.cloudstream3.R
|
||||||
import com.lagradost.cloudstream3.mvvm.logError
|
import com.lagradost.cloudstream3.mvvm.logError
|
||||||
import com.lagradost.cloudstream3.utils.AppUtils.parseJson
|
|
||||||
import com.lagradost.cloudstream3.utils.DataStore.getDefaultSharedPrefs
|
import com.lagradost.cloudstream3.utils.DataStore.getDefaultSharedPrefs
|
||||||
import com.lagradost.cloudstream3.utils.DataStore.getSharedPrefs
|
import com.lagradost.cloudstream3.utils.DataStore.getSharedPrefs
|
||||||
import com.lagradost.cloudstream3.utils.DataStore.mapper
|
import com.lagradost.cloudstream3.utils.DataStore.mapper
|
||||||
|
@ -152,7 +152,7 @@ object BackupUtils {
|
||||||
?: return@registerForActivityResult
|
?: return@registerForActivityResult
|
||||||
|
|
||||||
val restoredValue =
|
val restoredValue =
|
||||||
parseJson<BackupFile>(input.readBytes().toString())
|
mapper.readValue<BackupFile>(input)
|
||||||
activity.restore(
|
activity.restore(
|
||||||
restoredValue,
|
restoredValue,
|
||||||
restoreSettings = true,
|
restoreSettings = true,
|
||||||
|
|
Loading…
Reference in a new issue