Skip to content

Commit

Permalink
Revert "display mimir-ua in about page on debug mode"
Browse files Browse the repository at this point in the history
This reverts commit cc9df88.
  • Loading branch information
liplum committed Oct 14, 2024
1 parent cc9df88 commit 69549b0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 19 deletions.
24 changes: 12 additions & 12 deletions lib/backend/network/ua.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ class MimirUserAgentDioInterceptor extends Interceptor {
options.headers["User-Agent"] = buildMimirUa();
handler.next(options);
}
}

String buildMimirUa() {
return _encodeMimirUa([
"1",
"app",
"${R.meta.version}",
$locale.toLanguageTag(),
R.meta.platform.name,
R.uuid,
], {
"installer": R.meta.installerStore,
});
String buildMimirUa() {
return _encodeMimirUa([
"1",
"app",
"${R.meta.version}",
$locale.toLanguageTag(),
R.meta.platform.name,
R.uuid,
], {
"installer": R.meta.installerStore,
});
}
}

String _encodeMimirUa(List<String> fixed, Map<String, String?> kv) {
Expand Down
8 changes: 1 addition & 7 deletions lib/settings/page/about.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import 'package:flutter/services.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:mimir/agreements/entity/agreements.dart';
import 'package:mimir/agreements/page/privacy_policy.dart';
import 'package:mimir/backend/network/ua.dart';
import 'package:mimir/design/adaptive/dialog.dart';
import 'package:mimir/design/widget/list_tile.dart';
import 'package:mimir/feature/feature.dart';
Expand Down Expand Up @@ -89,12 +88,7 @@ class _AboutSettingsPageState extends ConsumerState<AboutSettingsPage> {
DetailListTile(
title: "UUID",
subtitle: R.uuid,
),
if (kDebugMode)
DetailListTile(
title: "Mimir user agent",
subtitle: buildMimirUa(),
),
)
],
),
],
Expand Down

0 comments on commit 69549b0

Please sign in to comment.