setup navigation for videoaudio settings

This commit is contained in:
Ida Delphine
2026-10-07 16:59:43 +08:00
committed by Aayush Gupta
parent ac3fb1d8ab
commit 24fc4d1194
3 changed files with 12 additions and 2 deletions
@@ -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
}