1
0
Fork 0
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:
Evgenii Kozlov 2024-12-09 20:37:46 +01:00 committed by Evgenii Kozlov
parent 88ab8c67d7
commit b08ca22e63

View file

@ -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 = {