fix: notification setting formatting

This commit is contained in:
rebelonion 2024-05-24 14:02:36 -05:00
parent a5304477c7
commit 7bce053202

View file

@ -25,6 +25,7 @@ import ani.dantotsu.settings.saving.PrefManager
import ani.dantotsu.settings.saving.PrefName import ani.dantotsu.settings.saving.PrefName
import ani.dantotsu.statusBarHeight import ani.dantotsu.statusBarHeight
import ani.dantotsu.themes.ThemeManager import ani.dantotsu.themes.ThemeManager
import java.util.Locale
class SettingsNotificationActivity : AppCompatActivity() { class SettingsNotificationActivity : AppCompatActivity() {
private lateinit var binding: ActivitySettingsNotificationsBinding private lateinit var binding: ActivitySettingsNotificationsBinding
@ -130,7 +131,10 @@ class SettingsNotificationActivity : AppCompatActivity() {
val dialog = AlertDialog.Builder(context, R.style.MyPopup) val dialog = AlertDialog.Builder(context, R.style.MyPopup)
.setTitle(R.string.anilist_notification_filters) .setTitle(R.string.anilist_notification_filters)
.setMultiChoiceItems( .setMultiChoiceItems(
types.toTypedArray(), types.map { name ->
name.replace("_", " ").lowercase().replaceFirstChar {
if (it.isLowerCase()) it.titlecase(Locale.ROOT) else it.toString()
} }.toTypedArray(),
selected selected
) { _, which, isChecked -> ) { _, which, isChecked ->
val type = types[which] val type = types[which]