Merge pull request #2384 from Bnyro/master

Check all backup options by default
This commit is contained in:
Bnyro 2022-12-15 19:51:10 +01:00 committed by GitHub
commit 4170834da9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 5 deletions

View File

@ -44,8 +44,8 @@ class BackupDialog(
it.localPlaylists = Database.localPlaylistsDao().getAll()
})
object Preferences : BackupOption(R.string.preferences, onSelected = {
it.preferences = PreferenceHelper.settings.all.map {
object Preferences : BackupOption(R.string.preferences, onSelected = { file ->
file.preferences = PreferenceHelper.settings.all.map {
PreferenceItem(it.key, it.value)
}
})
@ -64,7 +64,7 @@ class BackupDialog(
val backupItems = backupOptions.map { context?.getString(it.name)!! }.toTypedArray()
val selected = BooleanArray(backupOptions.size) { false }
val selected = BooleanArray(backupOptions.size) { true }
return MaterialAlertDialogBuilder(requireContext())
.setTitle(R.string.backup)

View File

@ -25,7 +25,6 @@ import androidx.annotation.RequiresApi
import androidx.constraintlayout.motion.widget.MotionLayout
import androidx.core.net.toUri
import androidx.core.os.bundleOf
import androidx.core.os.postDelayed
import androidx.core.view.isVisible
import androidx.fragment.app.activityViewModels
import androidx.lifecycle.Lifecycle
@ -1421,7 +1420,7 @@ class PlayerFragment : BaseFragment(), OnlinePlayerOptions {
.build()
private fun shouldStartPiP(): Boolean {
if (!PlayerHelper.pipEnabled || Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
if (!PlayerHelper.pipEnabled || SDK_INT >= Build.VERSION_CODES.S) {
return false
}