Added navigation endpoints

This commit is contained in:
Viktor De Pasquale
2019-04-11 20:09:37 +02:00
parent 2d58c725e0
commit 94ba7cb0c5
3 changed files with 58 additions and 1 deletions
@@ -1,4 +1,34 @@
package com.topjohnwu.magisk.model.navigation
import com.skoumal.teanity.viewevents.NavigationEvent
import com.topjohnwu.magisk.R
object Navigation
object Navigation {
fun home() = NavigationEvent {
navDirections { destination = R.id.magiskFragment }
navOptions { popUpTo = R.id.magiskFragment }
}
fun superuser() = NavigationEvent {
navDirections { destination = R.id.superuserFragment }
}
fun modules() = NavigationEvent {
navDirections { destination = R.id.modulesFragment }
}
fun repos() = NavigationEvent {
navDirections { destination = R.id.reposFragment }
}
fun hide() = NavigationEvent {
navDirections { destination = R.id.magiskHideFragment }
}
fun log() = NavigationEvent {
navDirections { destination = R.id.logFragment }
}
}