Fix nonTransferableKeys in BackupUtils (#979)

* Fix nonTransferableKeys in BackupUtils

* Whoops...

* really...
This commit is contained in:
Luna712 2024-03-11 06:12:51 +08:00 committed by GitHub
parent 807bd85fa9
commit a01bb9e55b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -65,13 +65,16 @@ object BackupUtils {
PLUGINS_KEY_LOCAL,
OPEN_SUBTITLES_USER_KEY,
"nginx_user", // Nginx user key
"biometric_key" // can lock down users if backup is shared on a incompatible device
DOWNLOAD_EPISODE_CACHE,
"biometric_key", // can lock down users if backup is shared on a incompatible device
"nginx_user" // Nginx user key
)
/** false if blacklisted key */
/** false if key should not be contained in backup */
private fun String.isTransferable(): Boolean {
return !nonTransferableKeys.contains(this)
return !nonTransferableKeys.any { this.contains(it) }
}
private var restoreFileSelector: ActivityResultLauncher<Array<String>>? = null
@ -257,4 +260,4 @@ object BackupUtils {
setKeyRaw(it.key, it.value, isEditingAppSettings)
}
}
}
}