MVP #141

Merged
flixcoo merged 705 commits from development into main 2026-01-09 12:55:50 +00:00
2 changed files with 3 additions and 7 deletions
Showing only changes of commit dba448b9c1 - Show all commits

View File

@@ -56,7 +56,7 @@ class _CustomNavigationBarState extends State<CustomNavigationBar>
onPressed: () async {
await Navigator.push(
context,
MaterialPageRoute(builder: (_) => SettingsView()),
MaterialPageRoute(builder: (_) => const SettingsView()),
);
setState(() {
tabKeyCount++;

View File

@@ -22,7 +22,6 @@ class GameHistoryView extends StatefulWidget {
class _GameHistoryViewState extends State<GameHistoryView> {
late Future<List<Game>> _gameListFuture;
late final AppDatabase db;
late bool isLoading = true;
late final List<Game> skeletonData = List.filled(
4,
@@ -51,9 +50,6 @@ class _GameHistoryViewState extends State<GameHistoryView> {
Future.wait([_gameListFuture]).then((result) async {
await Future.delayed(const Duration(milliseconds: 250));
setState(() {
isLoading = false;
});
});
}
@@ -87,14 +83,14 @@ class _GameHistoryViewState extends State<GameHistoryView> {
),
);
}
final bool isLoading =
snapshot.connectionState == ConnectionState.waiting;
final List<Game> games =
(isLoading ? skeletonData : (snapshot.data ?? [])
..sort(
(a, b) => b.createdAt.compareTo(a.createdAt),
))
.toList();
return AppSkeleton(
enabled: isLoading,
child: ListView.builder(