mirror of
https://github.com/anyproto/anytype-kotlin.git
synced 2025-06-08 05:47:05 +09:00
DROID-2973 Vault | Fix | Set max space count to 50 (#1716)
This commit is contained in:
parent
f9bb2f4c48
commit
107ccf98f5
4 changed files with 43 additions and 16 deletions
|
@ -28,6 +28,7 @@ import com.anytypeio.anytype.gallery_experience.models.GalleryInstallationNaviga
|
|||
import com.anytypeio.anytype.gallery_experience.models.GalleryInstallationSpacesState
|
||||
import com.anytypeio.anytype.gallery_experience.models.GalleryInstallationState
|
||||
import com.anytypeio.anytype.gallery_experience.models.GallerySpaceView
|
||||
import com.anytypeio.anytype.presentation.spaces.SelectSpaceViewModel
|
||||
import com.anytypeio.anytype.presentation.spaces.SpaceGradientProvider
|
||||
import com.anytypeio.anytype.presentation.spaces.spaceIcon
|
||||
import kotlinx.coroutines.flow.MutableSharedFlow
|
||||
|
@ -119,6 +120,9 @@ class GalleryInstallationViewModel(
|
|||
viewModelScope.launch {
|
||||
command.emit(GalleryInstallationNavigation.CloseSpaces)
|
||||
val state = (mainState.value as? GalleryInstallationState.Success) ?: return@launch
|
||||
if (spacesViewState.value.spaces.size >= SelectSpaceViewModel.MAX_SPACE_COUNT) {
|
||||
return@launch
|
||||
}
|
||||
val manifestInfo = state.info
|
||||
mainState.value = state.copy(isLoading = true)
|
||||
val params = CreateSpace.Params(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue