feat: AnalyticsApi disable firstLaunch

This commit is contained in:
xkeyC 2025-11-13 20:24:09 +08:00
parent c31b31516f
commit 71c3b61bdd
2 changed files with 5 additions and 8 deletions

View File

@ -121,10 +121,10 @@ class AppGlobalModel extends _$AppGlobalModel {
if (!kIsWeb) Hive.init("$applicationSupportDir/db");
final box = await Hive.openBox("app_conf");
state = state.copyWith(appConfBox: box);
if (box.get("install_id", defaultValue: "") == "") {
await box.put("install_id", const Uuid().v4());
AnalyticsApi.touch("firstLaunch");
}
// if (box.get("install_id", defaultValue: "") == "") {
// await box.put("install_id", const Uuid().v4());
// AnalyticsApi.touch("firstLaunch");
// }
final deviceUUID = box.get("install_id", defaultValue: "");
final localeCode = box.get("app_locale", defaultValue: null);
Locale? locale;

View File

@ -10,10 +10,7 @@ class RSHttp {
static Map<String, String> _defaultHeaders = {};
static Future<void> init() async {
_defaultHeaders = {
"User-Agent":
"SCToolBox/${ConstConf.appVersion} (${ConstConf.appVersionCode})${ConstConf.isMSE ? "" : " DEV"} RSHttp",
};
_defaultHeaders = {};
_dio = Dio(
BaseOptions(