reformat code
This commit is contained in:
+2
-8
@@ -39,13 +39,11 @@ class SettingsComponent(
|
|||||||
val showOffline: () -> Unit,
|
val showOffline: () -> Unit,
|
||||||
val showTags: () -> Unit
|
val showTags: () -> Unit
|
||||||
) : ComponentContext by context {
|
) : ComponentContext by context {
|
||||||
val updateComponent = updateComponentFactory.create(childContext("UpdateComponent"))
|
|
||||||
|
|
||||||
val serverInfo = serverConfigurationRepository.serverConfiguration.map { it.asHttpStr() }
|
|
||||||
private val componentScope = createComponentScope()
|
private val componentScope = createComponentScope()
|
||||||
|
|
||||||
|
val updateComponent = updateComponentFactory.create(childContext("UpdateComponent"))
|
||||||
|
val serverInfo = serverConfigurationRepository.serverConfiguration.map { it.asHttpStr() }
|
||||||
val externalPlayerState = playerSettingsStorge.useExternalPlayer
|
val externalPlayerState = playerSettingsStorge.useExternalPlayer
|
||||||
|
|
||||||
val tokenInfo = tokenStorage.token
|
val tokenInfo = tokenStorage.token
|
||||||
|
|
||||||
fun setExternalPlayerState(newState: Boolean) {
|
fun setExternalPlayerState(newState: Boolean) {
|
||||||
@@ -54,10 +52,6 @@ class SettingsComponent(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun checkUpdates() {
|
|
||||||
updateComponent.checkUpdates()
|
|
||||||
}
|
|
||||||
|
|
||||||
fun logout() {
|
fun logout() {
|
||||||
componentScope.launch(dispatcherProvider.main) {
|
componentScope.launch(dispatcherProvider.main) {
|
||||||
logoutUseCase.logout()
|
logoutUseCase.logout()
|
||||||
|
|||||||
+1
-1
@@ -77,7 +77,7 @@ fun SettingsContent(comp: SettingsComponent, paddingValues: PaddingValues) {
|
|||||||
item {
|
item {
|
||||||
TextPreference(
|
TextPreference(
|
||||||
text = stringResource(Res.string.check_for_updates),
|
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.VBoxRootComponent
|
||||||
import ru.shadowsparky.vbox.shared.presentation.nav.Route
|
import ru.shadowsparky.vbox.shared.presentation.nav.Route
|
||||||
|
|
||||||
@KoinApplication
|
@KoinApplication(modules = [AppModule::class])
|
||||||
object VBox
|
object VBox
|
||||||
|
|
||||||
@Module
|
@Module
|
||||||
|
|||||||
Reference in New Issue
Block a user