You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
Added themes
All files (that used styles) were refactored to use styles directly so themes can only actually adjust colors - Elaborate themes would be super hard to maintain and would certainly break over time
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
package com.topjohnwu.magisk.model.entity.recycler
|
||||
|
||||
import com.topjohnwu.magisk.R
|
||||
import com.topjohnwu.magisk.databinding.ComparableRvItem
|
||||
import com.topjohnwu.magisk.redesign.theme.Theme
|
||||
|
||||
class ThemeItem(val theme: Theme) : ComparableRvItem<ThemeItem>() {
|
||||
|
||||
override val layoutRes = R.layout.item_theme
|
||||
|
||||
override fun contentSameAs(other: ThemeItem) = itemSameAs(other)
|
||||
override fun itemSameAs(other: ThemeItem) = theme == other.theme
|
||||
|
||||
}
|
||||
@@ -8,6 +8,7 @@ import com.topjohnwu.magisk.Const
|
||||
import com.topjohnwu.magisk.intent
|
||||
import com.topjohnwu.magisk.redesign.install.InstallFragment
|
||||
import com.topjohnwu.magisk.redesign.safetynet.SafetynetFragment
|
||||
import com.topjohnwu.magisk.redesign.theme.ThemeFragment
|
||||
import com.topjohnwu.magisk.ui.MainActivity
|
||||
import com.topjohnwu.magisk.ui.hide.MagiskHideFragment
|
||||
import com.topjohnwu.magisk.ui.home.HomeFragment
|
||||
@@ -98,6 +99,10 @@ object Navigation {
|
||||
navDirections { destination = InstallFragment::class }
|
||||
}
|
||||
|
||||
fun theme() = MagiskNavigationEvent {
|
||||
navDirections { destination = ThemeFragment::class }
|
||||
}
|
||||
|
||||
fun fromSection(section: String) = when (section) {
|
||||
"superuser" -> superuser()
|
||||
"modules" -> modules()
|
||||
|
||||
Reference in New Issue
Block a user