mirror of
https://github.com/anyproto/anytype-kotlin.git
synced 2025-06-08 05:47:05 +09:00
DROID-3086 Spaces | Fix | Observe requests on space-settings screen (#1831)
This commit is contained in:
parent
a50bf60f99
commit
f12cb49b43
1 changed files with 3 additions and 4 deletions
|
@ -33,7 +33,6 @@ import com.anytypeio.anytype.domain.misc.UrlBuilder
|
|||
import com.anytypeio.anytype.domain.multiplayer.ActiveSpaceMemberSubscriptionContainer
|
||||
import com.anytypeio.anytype.domain.multiplayer.SpaceViewSubscriptionContainer
|
||||
import com.anytypeio.anytype.domain.multiplayer.UserPermissionProvider
|
||||
import com.anytypeio.anytype.domain.multiplayer.isSharingLimitReached
|
||||
import com.anytypeio.anytype.domain.multiplayer.sharedSpaceCount
|
||||
import com.anytypeio.anytype.domain.payments.GetMembershipStatus
|
||||
import com.anytypeio.anytype.domain.search.ProfileSubscriptionManager
|
||||
|
@ -96,10 +95,10 @@ class SpaceSettingsViewModel(
|
|||
.map { wrapper ->
|
||||
wrapper.getValue<Double?>(Relations.SHARED_SPACES_LIMIT)?.toInt() ?: 0
|
||||
},
|
||||
spaceViewContainer.sharedSpaceCount(userPermissionProvider.all())
|
||||
) { spaceView, permission, sharedSpaceLimit: Int, sharedSpaceCount: Int ->
|
||||
spaceViewContainer.sharedSpaceCount(userPermissionProvider.all()),
|
||||
activeSpaceMemberSubscriptionContainer.observe(params.space),
|
||||
) { spaceView, permission, sharedSpaceLimit: Int, sharedSpaceCount: Int, store ->
|
||||
Timber.d("Got shared space limit: $sharedSpaceLimit, shared space count: $sharedSpaceCount")
|
||||
val store = activeSpaceMemberSubscriptionContainer.get(params.space)
|
||||
val requests: Int = if (store is ActiveSpaceMemberSubscriptionContainer.Store.Data) {
|
||||
store.members.count { it.status == ParticipantStatus.JOINING }
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue