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

DROID-1734 Analytics | Fix | Space settings events (#427)

This commit is contained in:
Evgenii Kozlov 2023-10-10 16:18:45 +02:00 committed by uburoiubu
parent 4687be5942
commit 2ed3b52da0
No known key found for this signature in database
GPG key ID: C8FB80E0A595FBB6
2 changed files with 10 additions and 2 deletions

View file

@ -18,6 +18,10 @@ object EventsDictionary {
const val restoreFromBin = "RestoreFromBin"
// Settings events
const val screenSettingSpacesSpaceIndex = "ScreenSettingsSpaceIndex"
const val wallpaperSet = "SettingsWallpaperSet"
const val keychainCopy = "KeychainCopy"
const val defaultTypeChanged = "DefaultTypeChange"

View file

@ -15,7 +15,6 @@ import com.anytypeio.anytype.domain.config.ConfigStorage
import com.anytypeio.anytype.domain.debugging.DebugSpaceShareDownloader
import com.anytypeio.anytype.domain.library.StoreSearchByIdsParams
import com.anytypeio.anytype.domain.library.StorelessSubscriptionContainer
import com.anytypeio.anytype.domain.library.StorelessSubscriptionContainer.Companion.SUBSCRIPTION_SETTINGS
import com.anytypeio.anytype.domain.misc.UrlBuilder
import com.anytypeio.anytype.domain.`object`.SetObjectDetails
import com.anytypeio.anytype.presentation.profile.ProfileIconView
@ -23,7 +22,6 @@ import com.anytypeio.anytype.presentation.profile.profileIcon
import com.anytypeio.anytype.presentation.spaces.SpaceGradientProvider
import com.anytypeio.anytype.presentation.spaces.SpaceIconView
import com.anytypeio.anytype.presentation.spaces.spaceIcon
import javax.inject.Named
import kotlinx.coroutines.flow.MutableSharedFlow
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.SharingStarted
@ -95,6 +93,12 @@ class MainSettingsViewModel(
.onEach { event -> dispatchAnalyticEvent(event) }
.onEach { event -> dispatchCommand(event) }
.launchIn(viewModelScope)
viewModelScope.launch {
analytics.sendEvent(
eventName = EventsDictionary.screenSettingSpacesSpaceIndex
)
}
}
fun onOptionClicked(event: Event) {