chore: clean up codebase (#42)

Reviewed-on: https://git.reya.su/reya/coop-mobile/pulls/42
This commit is contained in:
2026-07-13 01:04:15 +00:00
parent a5951e03cf
commit 410615bd89
32 changed files with 1360 additions and 1466 deletions
@@ -3,16 +3,15 @@ package su.reya.coop.screens
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import su.reya.coop.LocalAccountViewModel
import su.reya.coop.LocalNavigator
import su.reya.coop.Screen
import su.reya.coop.shared.ProfileEditor
import su.reya.coop.viewmodel.AccountViewModel
@Composable
fun NewIdentityScreen() {
val accountViewModel = LocalAccountViewModel.current
fun NewIdentityScreen(viewModel: AccountViewModel) {
val navigator = LocalNavigator.current
val accountState by accountViewModel.state.collectAsStateWithLifecycle()
val accountState by viewModel.state.collectAsStateWithLifecycle()
ProfileEditor(
title = "Create a new identity",
@@ -20,7 +19,7 @@ fun NewIdentityScreen() {
isBusy = accountState.isImporting,
onBack = { navigator.goBack() },
onConfirm = { name, bio, bytes, type ->
accountViewModel.createIdentity(name, bio, bytes, type)
viewModel.createIdentity(name, bio, bytes, type)
navigator.navigate(Screen.Home)
}
)