Revert accidentally committed stuff (oops)
This commit is contained in:
parent
01a1a9ebab
commit
51a33a47cd
@ -8,7 +8,6 @@ import com.bluelinelabs.conductor.Controller
|
|||||||
import eu.kanade.tachiyomi.R
|
import eu.kanade.tachiyomi.R
|
||||||
import eu.kanade.tachiyomi.data.database.models.Manga
|
import eu.kanade.tachiyomi.data.database.models.Manga
|
||||||
import eu.kanade.tachiyomi.ui.base.controller.DialogController
|
import eu.kanade.tachiyomi.ui.base.controller.DialogController
|
||||||
import eu.kanade.tachiyomi.util.isLocal
|
|
||||||
|
|
||||||
class DeleteLibraryMangasDialog<T>(bundle: Bundle? = null) :
|
class DeleteLibraryMangasDialog<T>(bundle: Bundle? = null) :
|
||||||
DialogController(bundle) where T : Controller, T : DeleteLibraryMangasDialog.Listener {
|
DialogController(bundle) where T : Controller, T : DeleteLibraryMangasDialog.Listener {
|
||||||
@ -21,14 +20,11 @@ class DeleteLibraryMangasDialog<T>(bundle: Bundle? = null) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreateDialog(savedViewState: Bundle?): Dialog {
|
override fun onCreateDialog(savedViewState: Bundle?): Dialog {
|
||||||
val canDeleteChapters = mangas.any { !it.isLocal() }
|
|
||||||
|
|
||||||
return MaterialDialog(activity!!)
|
return MaterialDialog(activity!!)
|
||||||
.title(R.string.action_remove)
|
.title(R.string.action_remove)
|
||||||
.listItemsMultiChoice(
|
.listItemsMultiChoice(
|
||||||
res = R.array.delete_selected_mangas,
|
R.array.delete_selected_mangas,
|
||||||
disabledIndices = intArrayOf(1).takeUnless { canDeleteChapters },
|
initialSelection = intArrayOf(0)
|
||||||
initialSelection = intArrayOf(0),
|
|
||||||
) { _, selections, _ ->
|
) { _, selections, _ ->
|
||||||
val deleteFromLibrary = 0 in selections
|
val deleteFromLibrary = 0 in selections
|
||||||
val deleteChapters = 1 in selections
|
val deleteChapters = 1 in selections
|
||||||
|
@ -71,7 +71,8 @@ class SettingsTrackingController :
|
|||||||
trackManager.komga.loginNoop()
|
trackManager.komga.loginNoop()
|
||||||
updatePreference(trackManager.komga.id)
|
updatePreference(trackManager.komga.id)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
preferenceCategory {
|
||||||
infoPreference(R.string.tracking_info)
|
infoPreference(R.string.tracking_info)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user