mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2026-10-11 02:01:49 +00:00
setup navigation for videoaudio settings
This commit is contained in:
committed by
Aayush Gupta
parent
ac3fb1d8ab
commit
24fc4d1194
@@ -15,6 +15,9 @@ import net.newpipe.app.model.License
|
||||
@Serializable
|
||||
sealed interface Destination : NavKey {
|
||||
|
||||
@Serializable
|
||||
data object VideoAudioSettings : Destination
|
||||
|
||||
@Serializable
|
||||
data object AppearanceSettings : Destination
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ 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.SettingsHomeScreen
|
||||
import net.newpipe.app.screen.settings.VideoAudioSettingsScreen
|
||||
import org.koin.core.annotation.KoinExperimentalAPI
|
||||
import org.koin.core.annotation.Provided
|
||||
import org.koin.core.annotation.Singleton
|
||||
@@ -37,6 +38,10 @@ fun navModule() = module {
|
||||
navigation<Destination.AppearanceSettings> {
|
||||
AppearanceSettingsScreen()
|
||||
}
|
||||
|
||||
navigation<Destination.VideoAudioSettings> {
|
||||
VideoAudioSettingsScreen()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -52,8 +52,10 @@ fun SettingsHomeScreen(
|
||||
icon = type.icon,
|
||||
onClick = {
|
||||
when (type) {
|
||||
SettingsCategoryType.APPEARANCE ->
|
||||
navigator.navigateTo(Destination.AppearanceSettings)
|
||||
SettingsCategoryType.APPEARANCE -> navigator.navigateTo(Destination.AppearanceSettings)
|
||||
|
||||
SettingsCategoryType.VIDEO_AUDIO -> navigator.navigateTo(Destination.VideoAudioSettings)
|
||||
|
||||
// TODO: wire remaining sub-screens as they are migrated
|
||||
else -> Unit
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user