mirror of
https://github.com/anyproto/anytype-kotlin.git
synced 2025-06-08 05:47:05 +09:00
DROID-434 Sets | Enhancement | Allow creating a set of sets (#2698)
This commit is contained in:
parent
11274dfbd3
commit
eecdc5e690
2 changed files with 13 additions and 4 deletions
|
@ -94,7 +94,8 @@ class ObjectTypeChangeFragment :
|
|||
smartBlockType = smartBlockType,
|
||||
excludedTypes = excludedTypes,
|
||||
isDraft = isDraft,
|
||||
selectedSources = selectedSources
|
||||
selectedSources = selectedSources,
|
||||
isSetSource = isSetSource
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,14 @@ import com.anytypeio.anytype.core_models.SmartBlockType
|
|||
import com.anytypeio.anytype.domain.dataview.interactor.GetCompatibleObjectTypes
|
||||
import com.anytypeio.anytype.presentation.common.BaseViewModel
|
||||
import com.anytypeio.anytype.presentation.mapper.toObjectTypeView
|
||||
import kotlinx.coroutines.flow.*
|
||||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
import kotlinx.coroutines.flow.combine
|
||||
import kotlinx.coroutines.flow.debounce
|
||||
import kotlinx.coroutines.flow.distinctUntilChanged
|
||||
import kotlinx.coroutines.flow.drop
|
||||
import kotlinx.coroutines.flow.emitAll
|
||||
import kotlinx.coroutines.flow.onCompletion
|
||||
import kotlinx.coroutines.flow.take
|
||||
import kotlinx.coroutines.launch
|
||||
import timber.log.Timber
|
||||
|
||||
|
@ -33,13 +40,14 @@ class ObjectTypeChangeViewModel(
|
|||
smartBlockType: SmartBlockType,
|
||||
excludedTypes: List<Id> = emptyList(),
|
||||
isDraft: Boolean,
|
||||
selectedSources: List<Id>
|
||||
selectedSources: List<Id>,
|
||||
isSetSource: Boolean
|
||||
) {
|
||||
viewModelScope.launch {
|
||||
getCompatibleObjectTypes.invoke(
|
||||
GetCompatibleObjectTypes.Params(
|
||||
smartBlockType = smartBlockType,
|
||||
isSetIncluded = isDraft
|
||||
isSetIncluded = if (isSetSource) true else isDraft
|
||||
)
|
||||
).proceed(
|
||||
failure = { Timber.e(it, "Error while getting object types") },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue