reformat code
This commit is contained in:
+2
-8
@@ -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()
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user