5 Commits

Author SHA1 Message Date
1a84d2572a Merge branch 'development' into setup/57-provisorisches-app-icon-implementiere
All checks were successful
Pull Request Pipeline / test (pull_request) Successful in 2m30s
Pull Request Pipeline / lint (pull_request) Successful in 2m38s
2025-11-23 18:57:26 +01:00
0153df6195 Merge pull request 'Skeleton Delay für group- und group create view' (#58) from enhancement/54-delay-für-groups-view-skeleton into development
Reviewed-on: #58
Reviewed-by: Felix Kirchner <felix.kirchner.fk@gmail.com>
2025-11-23 17:10:37 +00:00
604a541392 set delay in all future builders to 250ms
All checks were successful
Pull Request Pipeline / test (pull_request) Successful in 2m5s
Pull Request Pipeline / lint (pull_request) Successful in 2m7s
2025-11-23 17:09:52 +01:00
26fadf5093 add artificial delay to loadPlayerList for skeleton loading
All checks were successful
Pull Request Pipeline / test (pull_request) Successful in 2m8s
Pull Request Pipeline / lint (pull_request) Successful in 2m9s
2025-11-23 15:22:59 +01:00
9e8bab1a60 add artificial delay to group list loading 2025-11-23 15:21:40 +01:00
4 changed files with 11 additions and 4 deletions

View File

@@ -54,7 +54,11 @@ class _CreateGroupViewState extends State<CreateGroupView> {
}
void loadPlayerList() {
_allPlayersFuture = db.playerDao.getAllPlayers();
_allPlayersFuture = Future.delayed(
const Duration(milliseconds: 250),
() => db.playerDao.getAllPlayers(),
);
suggestedPlayers = skeletonData;
_allPlayersFuture.then((loadedPlayers) {
setState(() {
loadedPlayers.sort((a, b) => a.name.compareTo(b.name));

View File

@@ -34,7 +34,10 @@ class _GroupsViewState extends State<GroupsView> {
void initState() {
super.initState();
db = Provider.of<AppDatabase>(context, listen: false);
_allGroupsFuture = db.groupDao.getAllGroups();
_allGroupsFuture = Future.delayed(
const Duration(milliseconds: 250),
() => db.groupDao.getAllGroups(),
);
}
@override

View File

@@ -27,7 +27,7 @@ class _HomeViewState extends State<HomeView> {
_groupCountFuture = db.groupDao.getGroupCount();
Future.wait([_gameCountFuture, _groupCountFuture]).then((_) async {
await Future.delayed(const Duration(milliseconds: 50));
await Future.delayed(const Duration(milliseconds: 250));
if (mounted) {
setState(() {
isLoading = false;

View File

@@ -29,7 +29,7 @@ class _StatisticsViewState extends State<StatisticsView> {
_playersFuture = db.playerDao.getAllPlayers();
Future.wait([_gamesFuture, _playersFuture]).then((results) async {
await Future.delayed(const Duration(milliseconds: 200));
await Future.delayed(const Duration(milliseconds: 250));
final games = results[0] as List<Game>;
final players = results[1] as List<Player>;
winCounts = _calculateWinsForAllPlayers(games, players);