mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-14 16:47:25 +00:00
chore(metrics): add metric when we finally get to the app (#16856)
Fixes #16803 and #16804 When we finally do the call to go to the main app, we check if we were doing a login or an onboarding and then send a metric (if enabled)
This commit is contained in:
parent
dc9951cfb0
commit
f400a9402d
@ -1,4 +1,4 @@
|
||||
import NimQml, chronicles
|
||||
import NimQml, chronicles, json
|
||||
|
||||
import io_interface
|
||||
import view, controller
|
||||
@ -320,8 +320,17 @@ method emitObtainingPasswordSuccess*[T](self: Module[T], password: string) =
|
||||
self.view.emitObtainingPasswordSuccess(password)
|
||||
|
||||
method finishAppLoading*[T](self: Module[T]) =
|
||||
self.delegate.finishAppLoading()
|
||||
self.delegate.appReady()
|
||||
let currStateObj = self.view.currentStartupStateObj()
|
||||
if not currStateObj.isNil:
|
||||
var eventType = "user-logged-in"
|
||||
if currStateObj.flowType() != FlowType.AppLogin:
|
||||
eventType = "onboarding-completed"
|
||||
singletonInstance.globalEvents.addCentralizedMetricIfEnabled(eventType,
|
||||
$(%*{"flowType": currStateObj.flowType()}))
|
||||
|
||||
self.delegate.finishAppLoading()
|
||||
|
||||
|
||||
method checkFetchingStatusAndProceed*[T](self: Module[T]) =
|
||||
if self.view.fetchingDataModel().isEntityLoaded(FetchingFromWakuProfile):
|
||||
|
Loading…
x
Reference in New Issue
Block a user