Skip to content

Commit

Permalink
[stats] updated StatsFeatureUsage
Browse files Browse the repository at this point in the history
  • Loading branch information
liplum committed Sep 26, 2024
1 parent b4b0ab2 commit 1daf14b
Show file tree
Hide file tree
Showing 9 changed files with 120 additions and 102 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

## 2.7.0
- Added update channel options: `release` or `preview`.
- Introduced immersive timetable wallpaper.
- Introduced timetable palette generator from images.
- Cropping the timetable wallpaper.
Expand Down
2 changes: 2 additions & 0 deletions lib/backend/stats/entity/feature.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ class StatsFeatureUsage {
@Id()
int id;
final String feature;
final String result;
@Property(type: PropertyType.date)
final DateTime time;

StatsFeatureUsage({
this.id = 0,
required this.feature,
this.result = "",
required this.time,
});
}
2 changes: 1 addition & 1 deletion lib/login/page/index.dart
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ class _LoginPageState extends ConsumerState<LoginPage> {
icon: const Icon(Icons.login),
label: _i18n.login.text(),
),
if (!widget.isGuarded && ref.watch(CredentialsInit.storage.oa.$lastAuthTime) == null )
if (!widget.isGuarded && ref.watch(CredentialsInit.storage.oa.$lastAuthTime) == null)
$account >>
(ctx, account) =>
$password >>
Expand Down
33 changes: 19 additions & 14 deletions lib/objectbox-model.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,55 +4,60 @@
"_note3": "If you have VCS merge conflicts, you must resolve them according to ObjectBox docs.",
"entities": [
{
"id": "1:3049504742638355443",
"lastPropertyId": "3:6829777567001922062",
"id": "1:6058686906110423483",
"lastPropertyId": "4:1456794932391410454",
"name": "StatsFeatureUsage",
"properties": [
{
"id": "1:7339886906527342418",
"id": "1:8567821803968552595",
"name": "id",
"type": 6,
"flags": 1
},
{
"id": "2:3550306696746963752",
"name": "time",
"type": 10
"id": "2:6258818122600997136",
"name": "feature",
"type": 9
},
{
"id": "3:6829777567001922062",
"name": "feature",
"id": "3:3615904521094794642",
"name": "result",
"type": 9
},
{
"id": "4:1456794932391410454",
"name": "time",
"type": 10
}
],
"relations": []
},
{
"id": "2:2808936172102568470",
"lastPropertyId": "3:4450762094026544792",
"id": "2:6860077869163213812",
"lastPropertyId": "3:6558364299568351246",
"name": "StatsRoute",
"properties": [
{
"id": "1:2242334635534013885",
"id": "1:1088320578842355463",
"name": "id",
"type": 6,
"flags": 1
},
{
"id": "2:5995258184475796813",
"id": "2:6229011439275914211",
"name": "route",
"type": 9
},
{
"id": "3:4450762094026544792",
"id": "3:6558364299568351246",
"name": "time",
"type": 10
}
],
"relations": []
}
],
"lastEntityId": "2:2808936172102568470",
"lastEntityId": "2:6860077869163213812",
"lastIndexId": "0:0",
"lastRelationId": "0:0",
"lastSequenceId": "0:0",
Expand Down
49 changes: 28 additions & 21 deletions lib/objectbox.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions lib/school/oa_announce/page/list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,14 @@ class _OaAnnounceLoadingListState extends State<OaAnnounceLoadingList> with Auto
desc: i18n.noOaAnnouncementsTip,
)
: ListView.builder(
itemCount: announcements.length,
itemBuilder: (ctx, index) {
return Card.filled(
clipBehavior: Clip.hardEdge,
child: OaAnnounceTile(announcements[index]),
);
},
);
itemCount: announcements.length,
itemBuilder: (ctx, index) {
return Card.filled(
clipBehavior: Clip.hardEdge,
child: OaAnnounceTile(announcements[index]),
);
},
);
}

Future<void> loadMore() async {
Expand Down
2 changes: 1 addition & 1 deletion lib/settings/page/proxy.dart
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ class _EnableProxyToggleTile extends ConsumerWidget {
title: i18n.proxy.enableProxy.text(),
subtitle: i18n.proxy.enableProxyDesc.text(),
value: enabled,
onChanged: tileEnabled? onChanged : null,
onChanged: tileEnabled ? onChanged : null,
);
}
}
Expand Down
Loading

0 comments on commit 1daf14b

Please sign in to comment.