chore: move analytics to platform (#2960)
This commit is contained in:
21
packages/hoppscotch-common/src/helpers/app/index.ts
Normal file
21
packages/hoppscotch-common/src/helpers/app/index.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { platform } from "~/platform"
|
||||
|
||||
let initialized = false
|
||||
|
||||
export function initializeApp() {
|
||||
if (!initialized) {
|
||||
try {
|
||||
platform.auth.performAuthInit()
|
||||
platform.sync.settings.initSettingsSync()
|
||||
platform.sync.collections.initCollectionsSync()
|
||||
platform.sync.history.initHistorySync()
|
||||
platform.sync.environments.initEnvironmentsSync()
|
||||
platform.analytics?.initAnalytics()
|
||||
|
||||
initialized = true
|
||||
} catch (e) {
|
||||
// initializeApp throws exception if we reinitialize
|
||||
initialized = true
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user