mirror of
https://github.com/rebelonion/Dantotsu.git
synced 2026-01-24 05:31:02 +00:00
chore: cleanup pt 3
This commit is contained in:
@@ -24,6 +24,7 @@ import ani.dantotsu.settings.saving.PrefManager
|
||||
import ani.dantotsu.settings.saving.PrefName
|
||||
import ani.dantotsu.statusBarHeight
|
||||
import ani.dantotsu.themes.ThemeManager
|
||||
import ani.dantotsu.util.customAlertDialog
|
||||
import eu.kanade.domain.base.BasePreferences
|
||||
import eu.kanade.tachiyomi.extension.anime.AnimeExtensionManager
|
||||
import eu.kanade.tachiyomi.extension.manga.MangaExtensionManager
|
||||
@@ -169,27 +170,27 @@ class SettingsExtensionsActivity : AppCompatActivity() {
|
||||
val editText = dialogView.userAgentTextBox.apply {
|
||||
hint = getString(R.string.anime_add_repository)
|
||||
}
|
||||
val alertDialog = AlertDialog.Builder(context, R.style.MyPopup)
|
||||
.setTitle(R.string.anime_add_repository).setView(dialogView.root)
|
||||
.setPositiveButton(getString(R.string.ok)) { dialog, _ ->
|
||||
context.customAlertDialog().apply {
|
||||
setTitle(R.string.anime_add_repository)
|
||||
setCustomView(dialogView.root)
|
||||
setPosButton(getString(R.string.ok)) {
|
||||
if (!editText.text.isNullOrBlank()) processUserInput(
|
||||
editText.text.toString(),
|
||||
MediaType.ANIME,
|
||||
it.attachView
|
||||
)
|
||||
dialog.dismiss()
|
||||
}.setNegativeButton(getString(R.string.cancel)) { dialog, _ ->
|
||||
dialog.dismiss()
|
||||
}.create()
|
||||
|
||||
processEditorAction(
|
||||
alertDialog,
|
||||
editText,
|
||||
MediaType.ANIME,
|
||||
it.attachView
|
||||
)
|
||||
alertDialog.show()
|
||||
alertDialog.window?.setDimAmount(0.8f)
|
||||
}
|
||||
setNegButton(getString(R.string.cancel))
|
||||
attach { dialog ->
|
||||
processEditorAction(
|
||||
dialog,
|
||||
editText,
|
||||
MediaType.ANIME,
|
||||
it.attachView
|
||||
)
|
||||
}
|
||||
show()
|
||||
}
|
||||
},
|
||||
attach = {
|
||||
setExtensionOutput(it.attachView, MediaType.ANIME)
|
||||
|
||||
Reference in New Issue
Block a user