reformat code

This commit is contained in:
2026-08-08 11:27:24 +03:00
parent 501b02c607
commit 5e61f54759
3 changed files with 4 additions and 10 deletions
@@ -39,13 +39,11 @@ class SettingsComponent(
val showOffline: () -> Unit,
val showTags: () -> Unit
) : ComponentContext by context {
val updateComponent = updateComponentFactory.create(childContext("UpdateComponent"))
val serverInfo = serverConfigurationRepository.serverConfiguration.map { it.asHttpStr() }
private val componentScope = createComponentScope()
val updateComponent = updateComponentFactory.create(childContext("UpdateComponent"))
val serverInfo = serverConfigurationRepository.serverConfiguration.map { it.asHttpStr() }
val externalPlayerState = playerSettingsStorge.useExternalPlayer
val tokenInfo = tokenStorage.token
fun setExternalPlayerState(newState: Boolean) {
@@ -54,10 +52,6 @@ class SettingsComponent(
}
}
fun checkUpdates() {
updateComponent.checkUpdates()
}
fun logout() {
componentScope.launch(dispatcherProvider.main) {
logoutUseCase.logout()
@@ -77,7 +77,7 @@ fun SettingsContent(comp: SettingsComponent, paddingValues: PaddingValues) {
item {
TextPreference(
text = stringResource(Res.string.check_for_updates),
onClick = { comp.checkUpdates() }
onClick = { comp.updateComponent.checkUpdates() }
)
}
}
@@ -33,7 +33,7 @@ import ru.shadowsparky.vbox.shared.presentation.UrlRoutes
import ru.shadowsparky.vbox.shared.presentation.VBoxRootComponent
import ru.shadowsparky.vbox.shared.presentation.nav.Route
@KoinApplication
@KoinApplication(modules = [AppModule::class])
object VBox
@Module