QoL changes
All checks were successful
Release / meta (push) Successful in 22s
Release / linux-build (push) Successful in 4m32s
Release / android-build (push) Successful in 7m10s
Release / release-dev (push) Successful in 9s
Release / release-master (push) Successful in 9s

This commit is contained in:
2025-12-14 09:45:32 +00:00
parent 8116cfe7b1
commit f0dfbd185b
11 changed files with 887 additions and 321 deletions

View File

@@ -188,18 +188,19 @@ class _MyHomePageState extends State<MyHomePage> {
if (!_fetched) {
_fetched = true;
WidgetsBinding.instance.addPostFrameCallback((_) {
Future(() async {
final data = context.read<DataService>();
final auth = context.read<AuthService>();
api.setTokenProvider(() => auth.token);
await auth.tryRestoreSession();
if (!auth.isLoggedIn) return;
if (data.homepageStats == null) {
data.fetchHomepageStats();
}
if (data.legs.isEmpty) {
data.fetchLegs();
WidgetsBinding.instance.addPostFrameCallback((_) {
Future(() async {
final data = context.read<DataService>();
final auth = context.read<AuthService>();
api.setTokenProvider(() => auth.token);
await auth.tryRestoreSession();
if (!auth.isLoggedIn) return;
data.fetchEventFields();
if (data.homepageStats == null) {
data.fetchHomepageStats();
}
if (data.legs.isEmpty) {
data.fetchLegs();
}
if (data.traction.isEmpty) {
data.fetchHadTraction();