From b08ca22e63f8cf6ddcecb99cce8c79436b72e327 Mon Sep 17 00:00:00 2001 From: Evgenii Kozlov Date: Mon, 9 Dec 2024 20:37:46 +0100 Subject: [PATCH] DROID-3102 Spaces | Fix | Allow deleting the first private space after account creation (#1893) --- .../anytype/presentation/spaces/SpaceSettingsViewModel.kt | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/presentation/src/main/java/com/anytypeio/anytype/presentation/spaces/SpaceSettingsViewModel.kt b/presentation/src/main/java/com/anytypeio/anytype/presentation/spaces/SpaceSettingsViewModel.kt index b25f3a906e..d6207c127d 100644 --- a/presentation/src/main/java/com/anytypeio/anytype/presentation/spaces/SpaceSettingsViewModel.kt +++ b/presentation/src/main/java/com/anytypeio/anytype/presentation/spaces/SpaceSettingsViewModel.kt @@ -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 = {