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

DROID-1282 App | Analytics | ShowDeletionWarning event (#33)

This commit is contained in:
Konstantin Ivanov 2023-06-07 13:42:49 +02:00 committed by GitHub
parent 940b930a61
commit 57a9ad7c8f
Signed by: github
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 1 deletions

View file

@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!--typography, buttons 05.04-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"

View file

@ -1524,4 +1524,10 @@ suspend fun Analytics.proceedWithAccountEvent(
eventName = eventName,
props = Props(map = mapOf("accountId" to analyticsId))
)
}
suspend fun Analytics.sendDeletionWarning() {
sendEvent(
eventName = EventsDictionary.deletionWarningShow
)
}

View file

@ -37,6 +37,7 @@ import com.anytypeio.anytype.domain.objects.StoreOfObjectTypes
import com.anytypeio.anytype.domain.page.CreateObject
import com.anytypeio.anytype.domain.workspace.WorkspaceManager
import com.anytypeio.anytype.presentation.extension.sendAnalyticsObjectCreateEvent
import com.anytypeio.anytype.presentation.extension.sendDeletionWarning
import com.anytypeio.anytype.presentation.extension.sendScreenHomeEvent
import com.anytypeio.anytype.presentation.navigation.DefaultObjectView
import com.anytypeio.anytype.presentation.objects.ObjectAction
@ -549,6 +550,9 @@ class CollectionViewModel(
}
private fun deleteFromBin(ids: List<Id>) {
launch {
analytics.sendDeletionWarning()
}
launch {
commands.emit(Command.ConfirmRemoveFromBin(ids.size))
}