mirror of
https://github.com/rebelonion/Dantotsu.git
synced 2026-01-19 18:33:56 +00:00
fix: something
This commit is contained in:
@@ -189,7 +189,7 @@ class MediaListDialogFragment : BottomSheetDialogFragment() {
|
||||
media?.isListPrivate = checked
|
||||
}
|
||||
val removeList = PrefManager.getCustomVal("removeList", setOf<Int>())
|
||||
var remove = false
|
||||
var remove: Boolean? = null
|
||||
binding.mediaListShow.isChecked = media?.id in removeList
|
||||
binding.mediaListShow.setOnCheckedChangeListener { _, checked ->
|
||||
remove = checked
|
||||
@@ -259,10 +259,10 @@ class MediaListDialogFragment : BottomSheetDialogFragment() {
|
||||
)
|
||||
}
|
||||
}
|
||||
if (remove) {
|
||||
PrefManager.setCustomVal("removeList", removeList.plus(media?.id))
|
||||
} else {
|
||||
PrefManager.setCustomVal("removeList", removeList.minus(media?.id))
|
||||
if (remove == true) {
|
||||
PrefManager.setCustomVal("removeList", removeList.plus(media!!.id))
|
||||
} else if (remove == false) {
|
||||
PrefManager.setCustomVal("removeList", removeList.minus(media!!.id))
|
||||
}
|
||||
Refresh.all()
|
||||
snackString(getString(R.string.list_updated))
|
||||
|
||||
@@ -172,11 +172,10 @@ class MediaListDialogSmallFragment : BottomSheetDialogFragment() {
|
||||
media.isListPrivate = checked
|
||||
}
|
||||
val removeList = PrefManager.getCustomVal("removeList", setOf<Int>())
|
||||
var remove = false
|
||||
var remove: Boolean? = null
|
||||
binding.mediaListShow.isChecked = media.id in removeList
|
||||
binding.mediaListShow.setOnCheckedChangeListener { _, checked ->
|
||||
remove = checked
|
||||
|
||||
}
|
||||
binding.mediaListSave.setOnClickListener {
|
||||
scope.launch {
|
||||
@@ -205,9 +204,9 @@ class MediaListDialogSmallFragment : BottomSheetDialogFragment() {
|
||||
)
|
||||
}
|
||||
}
|
||||
if (remove) {
|
||||
if (remove == true) {
|
||||
PrefManager.setCustomVal("removeList", removeList.plus(media.id))
|
||||
} else {
|
||||
} else if (remove == false) {
|
||||
PrefManager.setCustomVal("removeList", removeList.minus(media.id))
|
||||
}
|
||||
Refresh.all()
|
||||
|
||||
Reference in New Issue
Block a user