Replace material-dialogs with Material Components' SY
This commit is contained in:
@@ -5,7 +5,7 @@ import android.app.Activity
|
||||
import android.util.Log
|
||||
import androidx.core.text.HtmlCompat
|
||||
import androidx.preference.PreferenceScreen
|
||||
import com.afollestad.materialdialogs.MaterialDialog
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import eu.kanade.tachiyomi.ui.setting.SettingsController
|
||||
import eu.kanade.tachiyomi.util.preference.defaultValue
|
||||
import eu.kanade.tachiyomi.util.preference.onClick
|
||||
@@ -36,23 +36,13 @@ class SettingsDebugController : SettingsController() {
|
||||
try {
|
||||
val result = it.call(DebugFunctions)
|
||||
val text = "Function returned result:\n\n$result"
|
||||
MaterialDialog(context)
|
||||
.title(text = title.toString())
|
||||
.message(text = text) {
|
||||
messageTextView.apply {
|
||||
setHorizontallyScrolling(true)
|
||||
setTextIsSelectable(true)
|
||||
}
|
||||
}
|
||||
MaterialAlertDialogBuilder(context)
|
||||
.setTitle(title.toString())
|
||||
.setMessage(text)
|
||||
} catch (t: Throwable) {
|
||||
val text = "Function threw exception:\n\n${Log.getStackTraceString(t)}"
|
||||
MaterialDialog(context)
|
||||
.message(text = text) {
|
||||
messageTextView.apply {
|
||||
setHorizontallyScrolling(true)
|
||||
setTextIsSelectable(true)
|
||||
}
|
||||
}
|
||||
MaterialAlertDialogBuilder(context)
|
||||
.setMessage(text)
|
||||
}.show()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user