Possible fix for Analytics option

This commit is contained in:
Sad Ellie 2022-06-03 20:02:15 +03:00
parent 2adf756bff
commit 02a6826e1f

View File

@ -477,7 +477,11 @@ class MainViewModel @Inject constructor(
precision = userPref.digitsPrecision precision = userPref.digitsPrecision
separator = userPref.separator.also { Formatter.setSeparator(it) } separator = userPref.separator.also { Formatter.setSeparator(it) }
outputFormat = userPref.outputFormat outputFormat = userPref.outputFormat
enableAnalytics = userPref.enableAnalytics enableAnalytics = userPref.enableAnalytics.also {
// Maybe this is unnecessary
if (it != enableAnalytics) FirebaseAnalytics.getInstance(application)
.setAnalyticsCollectionEnabled(enableAnalytics)
}
} }
} }
} }