update user-agent

This commit is contained in:
arm64v8a
2023-10-14 15:36:56 +09:00
parent 2cd04de1d2
commit 05bf2b6f6f
5 changed files with 21 additions and 12 deletions

View File

@@ -263,16 +263,6 @@ int main(int argc, char* argv[]) {
MW_dialog_message("", "Raise");
});
// Do preset update
if (NekoGui::dataStore->user_agent.isEmpty() || NekoGui::dataStore->user_agent.startsWith("Nekoray/1.0") || NekoGui::dataStore->user_agent.startsWith("ClashForAndroid")) {
if (IS_NEKO_BOX) {
NekoGui::dataStore->user_agent = "NekoBox/PC/2.0 (Prefer ClashMeta Format)";
} else {
NekoGui::dataStore->user_agent = "NekoRay/PC/2.0 (Prefer ClashMeta Format)";
}
NekoGui::dataStore->Save();
}
UI_InitMainWindow();
return QApplication::exec();
}