Add: Page's title for Prefs

This commit is contained in:
machiav3lli
2022-09-16 15:11:33 +02:00
parent 755b89d08d
commit 7008dd91e7
2 changed files with 31 additions and 1 deletions

View File

@ -526,6 +526,17 @@ fun Spanned.toAnnotatedString(): AnnotatedString = buildAnnotatedString {
}
}
fun NavDestination.destinationToItem(): NavItem? = listOf(
NavItem.Explore,
NavItem.Latest,
NavItem.Installed,
NavItem.Prefs,
NavItem.PersonalPrefs,
NavItem.UpdatesPrefs,
NavItem.ReposPrefs,
NavItem.OtherPrefs
).find { this.route == it.destination }
fun Activity.setCustomTheme() {
if (!isDynamicColorsTheme) setTheme(Preferences[Preferences.Key.Theme].getResId(resources.configuration))
else {