Skip to content

Commit

Permalink
[stats] unified feature result
Browse files Browse the repository at this point in the history
  • Loading branch information
liplum committed Sep 26, 2024
1 parent 319baeb commit 6f03bba
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/life/electricity/widget/search.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Future<String?> searchRoom({
required ValueNotifier<List<String>> $searchHistory,
required List<String> roomList,
}) async {
Stats.feature(AppFeature.electricityBalance, "/search");
Stats.feature(AppFeature.electricityBalance, "search");
final result = await showSearch(
useRootNavigator: true,
context: ctx,
Expand Down
4 changes: 2 additions & 2 deletions lib/life/expense_records/card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ class _ExpenseRecordsAppCardState extends ConsumerState<ExpenseRecordsAppCard> w
onPressed: () async {
final success = await guardLaunchUrlString(context, _alipaySchoolCardTopUpMiniapp);
if (success) {
Stats.feature(AppFeature.expenseRecords, "/top-up?launched");
Stats.feature(AppFeature.expenseRecords, "top-up.launched");
} else {
Stats.feature(AppFeature.expenseRecords, "/top-up?failed");
Stats.feature(AppFeature.expenseRecords, "top-up.failed");
if (!context.mounted) return;
context.showTip(
title: i18n.launchFailed,
Expand Down
4 changes: 2 additions & 2 deletions lib/life/lab_door/card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ class _OpenLabDoorAppCardState extends ConsumerState<OpenLabDoorAppCard> {
await Future.delayed(const Duration(milliseconds: 2000));
if (!mounted) return;
context.showSnackBar(content: "开门成功".text());
Stats.feature(AppFeature.sitRobotOpenLabDoor, "/open?success");
Stats.feature(AppFeature.sitRobotOpenLabDoor, "open.success");
} else {
Stats.feature(AppFeature.sitRobotOpenLabDoor, "/open?failed");
Stats.feature(AppFeature.sitRobotOpenLabDoor, "open.failed");
if (!mounted) return;
context.showSnackBar(content: "开门失败".text());
}
Expand Down

0 comments on commit 6f03bba

Please sign in to comment.