(Re)Added animations and shortcut endpoints

Fixed first backpress closing the app instead of showing default fragment
This commit is contained in:
Viktor De Pasquale
2019-04-27 12:08:41 +02:00
parent f3cd9a096a
commit d52210dd90
4 changed files with 34 additions and 2 deletions
@@ -79,4 +79,6 @@ class MagiskAnimBuilder {
@AnimRes
@AnimatorRes
var popExit = 0
val anySet: Boolean get() = enter != 0 || exit != 0 || popEnter != 0 || popExit != 0
}
@@ -40,6 +40,16 @@ object Navigation {
navDirections { destination = SettingsFragment::class }
}
fun fromSection(section: String) = when (section) {
"superuser" -> superuser()
"modules" -> modules()
"downloads" -> repos()
"magiskhide" -> hide()
"log" -> log()
"settings" -> settings()
else -> home()
}
object Main {
const val OPEN_NAV = 1