mirror of
https://github.com/anyproto/anytype-kotlin.git
synced 2025-06-08 05:47:05 +09:00
DROID-3102 Spaces | Fix | Allow deleting the first private space after account creation (#1893)
This commit is contained in:
parent
88ab8c67d7
commit
b08ca22e63
1 changed files with 1 additions and 7 deletions
|
@ -246,13 +246,7 @@ class SpaceSettingsViewModel(
|
|||
val state = spaceViewState.value
|
||||
if (state is ViewState.Success) {
|
||||
val space = state.data.spaceId
|
||||
val accountConfig = configStorage.getOrNull()
|
||||
if (accountConfig == null) {
|
||||
sendToast("Account config not found")
|
||||
return
|
||||
}
|
||||
val personalSpaceId = accountConfig.space
|
||||
if (space != null && space != personalSpaceId) {
|
||||
if (space != null) {
|
||||
viewModelScope.launch {
|
||||
deleteSpace.async(params = SpaceId(space)).fold(
|
||||
onSuccess = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue