1
0
Fork 0
mirror of https://github.com/anyproto/anytype-kotlin.git synced 2025-06-08 05:47:05 +09:00

DROID-3479 Widgets | Enhancement | Show toast when type widget is automatically added to widgets (#2254)

This commit is contained in:
Evgenii Kozlov 2025-04-08 14:24:48 +02:00 committed by GitHub
parent c349ffbfc4
commit 01ca96624a
Signed by: github
GPG key ID: B5690EEEBB952194
8 changed files with 47 additions and 0 deletions

View file

@ -56,6 +56,7 @@ class MiddlewareEventChannel(
blockDataviewTargetObjectIdSet != null -> true
blockDataviewIsCollectionSet != null -> true
blockSetWidget != null -> true
spaceAutoWidgetAdded != null -> true
else -> false.also {
if (featureToggles.isLogMiddlewareInteraction)
Timber.w("Ignored event: $this")

View file

@ -322,6 +322,16 @@ fun anytype.Event.Message.toCoreModels(
}
)
}
spaceAutoWidgetAdded != null -> {
val event = spaceAutoWidgetAdded
checkNotNull(event)
Event.Command.Widgets.AutoWidgetAdded(
context = context,
target = event.targetId,
targetName = event.targetName,
widgetBlockId = event.widgetBlockId
)
}
else -> {
if (BuildConfig.DEBUG) {
Timber.w("Skipped event while mapping: $this")