This commit is contained in:
LagradOst 2022-07-28 18:54:38 +02:00
parent 4fe03e8b08
commit 0fb0c6b39f

View file

@ -10,10 +10,10 @@ import androidx.activity.result.ActivityResultLauncher
import androidx.activity.result.contract.ActivityResultContracts
import androidx.fragment.app.FragmentActivity
import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.module.kotlin.readValue
import com.lagradost.cloudstream3.CommonActivity.showToast
import com.lagradost.cloudstream3.R
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.getSharedPrefs
import com.lagradost.cloudstream3.utils.DataStore.mapper
@ -152,7 +152,7 @@ object BackupUtils {
?: return@registerForActivityResult
val restoredValue =
parseJson<BackupFile>(input.readBytes().toString())
mapper.readValue<BackupFile>(input)
activity.restore(
restoredValue,
restoreSettings = true,