From 24fc4d119448029d44a6493fb67631062db3b817 Mon Sep 17 00:00:00 2001 From: Ida Delphine Date: Thu, 16 Jul 2026 23:46:35 +0100 Subject: [PATCH] setup navigation for videoaudio settings --- .../kotlin/net/newpipe/app/navigation/Destination.kt | 3 +++ .../kotlin/net/newpipe/app/navigation/NavModule.kt | 5 +++++ .../net/newpipe/app/screen/settings/SettingsHomeScreen.kt | 6 ++++-- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/shared/src/commonMain/kotlin/net/newpipe/app/navigation/Destination.kt b/shared/src/commonMain/kotlin/net/newpipe/app/navigation/Destination.kt index 49f6f0900..0d0c8c172 100644 --- a/shared/src/commonMain/kotlin/net/newpipe/app/navigation/Destination.kt +++ b/shared/src/commonMain/kotlin/net/newpipe/app/navigation/Destination.kt @@ -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 diff --git a/shared/src/commonMain/kotlin/net/newpipe/app/navigation/NavModule.kt b/shared/src/commonMain/kotlin/net/newpipe/app/navigation/NavModule.kt index d7f6f3b61..1030e1433 100644 --- a/shared/src/commonMain/kotlin/net/newpipe/app/navigation/NavModule.kt +++ b/shared/src/commonMain/kotlin/net/newpipe/app/navigation/NavModule.kt @@ -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 { AppearanceSettingsScreen() } + + navigation { + VideoAudioSettingsScreen() + } } /** diff --git a/shared/src/commonMain/kotlin/net/newpipe/app/screen/settings/SettingsHomeScreen.kt b/shared/src/commonMain/kotlin/net/newpipe/app/screen/settings/SettingsHomeScreen.kt index 520aee0f1..e3cadd514 100644 --- a/shared/src/commonMain/kotlin/net/newpipe/app/screen/settings/SettingsHomeScreen.kt +++ b/shared/src/commonMain/kotlin/net/newpipe/app/screen/settings/SettingsHomeScreen.kt @@ -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 }