mirror of
https://github.com/anyproto/anytype-kotlin.git
synced 2025-06-08 05:47:05 +09:00
This commit is contained in:
parent
a5124466ed
commit
f2d5cb4c65
3 changed files with 20 additions and 6 deletions
|
@ -30,6 +30,7 @@ import com.anytypeio.anytype.presentation.home.OpenObjectNavigation
|
|||
import com.anytypeio.anytype.presentation.relations.value.`object`.ObjectValueViewModel
|
||||
import com.anytypeio.anytype.presentation.relations.value.`object`.ObjectValueViewModelFactory
|
||||
import com.anytypeio.anytype.presentation.relations.value.tagstatus.RelationContext
|
||||
import com.anytypeio.anytype.ui.base.navigation
|
||||
import com.anytypeio.anytype.ui.chats.ChatFragment
|
||||
import com.anytypeio.anytype.ui.date.DateObjectFragment
|
||||
import com.anytypeio.anytype.ui.editor.EditorFragment
|
||||
|
@ -122,8 +123,15 @@ class ObjectValueFragment : BaseBottomSheetComposeFragment() {
|
|||
)
|
||||
)
|
||||
}
|
||||
OpenObjectNavigation.NonValidObject -> {
|
||||
toast(getString(R.string.error_non_valid_object))
|
||||
is OpenObjectNavigation.OpenType -> {
|
||||
runCatching {
|
||||
navigation().openObjectType(
|
||||
objectId = nav.target,
|
||||
space = nav.space
|
||||
)
|
||||
}.onFailure {
|
||||
Timber.e(it, "Error while opening object type from ")
|
||||
}
|
||||
}
|
||||
is OpenObjectNavigation.OpenDateObject -> {
|
||||
runCatching {
|
||||
|
@ -138,12 +146,12 @@ class ObjectValueFragment : BaseBottomSheetComposeFragment() {
|
|||
Timber.e(it, "Failed to navigate to date object screen")
|
||||
}
|
||||
}
|
||||
OpenObjectNavigation.NonValidObject -> {
|
||||
toast(getString(R.string.error_non_valid_object))
|
||||
}
|
||||
is OpenObjectNavigation.UnexpectedLayoutError -> {
|
||||
toast(getString(R.string.error_unexpected_layout))
|
||||
}
|
||||
else -> {
|
||||
// Do nothing.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2581,6 +2581,12 @@ fun ObjectType.Layout.navigation(
|
|||
space = space
|
||||
)
|
||||
}
|
||||
ObjectType.Layout.OBJECT_TYPE -> {
|
||||
OpenObjectNavigation.OpenType(
|
||||
target = target,
|
||||
space = space
|
||||
)
|
||||
}
|
||||
else -> {
|
||||
OpenObjectNavigation.UnexpectedLayoutError(this)
|
||||
}
|
||||
|
|
|
@ -116,7 +116,7 @@ class ObjectValueViewModel(
|
|||
}
|
||||
}
|
||||
|
||||
private suspend fun getSearchParams(
|
||||
private fun getSearchParams(
|
||||
relation: ObjectWrapper.Relation,
|
||||
query: String,
|
||||
ids: List<Id>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue