mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2026-11-23 15:47:20 +00:00
set up navigation
This commit is contained in:
1 parent
1ee2f07454
commit
1ce2e627d6
3 files changed
+12
No files matched your search
@@ -14,6 +14,9 @@ import kotlinx.serialization.Serializable
|
||||
@Serializable
|
||||
sealed interface Destination : NavKey {
|
||||
|
||||
@Serializable
|
||||
data object ContentSettings : Destination
|
||||
|
||||
@Serializable
|
||||
data object HistorySettings : Destination
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import androidx.compose.runtime.mutableStateListOf
|
||||
import co.touchlab.kermit.Logger
|
||||
import net.newpipe.app.screen.about.AboutScreen
|
||||
import net.newpipe.app.screen.settings.AppearanceSettingsScreen
|
||||
import net.newpipe.app.screen.settings.ContentSettingsScreen
|
||||
import net.newpipe.app.screen.settings.DebugSettingsScreen
|
||||
import net.newpipe.app.screen.settings.DownloadSettingsScreen
|
||||
import net.newpipe.app.screen.settings.HistorySettingsScreen
|
||||
@@ -62,6 +63,10 @@ fun navModule() = module {
|
||||
navigation<Destination.HistorySettings> {
|
||||
HistorySettingsScreen()
|
||||
}
|
||||
|
||||
navigation<Destination.ContentSettings> {
|
||||
ContentSettingsScreen()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -72,6 +72,10 @@ fun SettingsHomeScreen(
|
||||
Destination.HistorySettings
|
||||
)
|
||||
|
||||
SettingsCategoryType.CONTENT -> navigator.navigateTo(
|
||||
Destination.ContentSettings
|
||||
)
|
||||
|
||||
// TODO: wire remaining sub-screens as they are migrated
|
||||
else -> Unit
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user