From cc6a7fee2543d3c4b6382816984c2e5866478dec Mon Sep 17 00:00:00 2001 From: Felix Kirchner Date: Wed, 16 Jul 2025 14:27:38 +0200 Subject: [PATCH 1/3] Fixed bug with wrong medal icon --- lib/presentation/views/round_view.dart | 6 ++++-- pubspec.yaml | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/presentation/views/round_view.dart b/lib/presentation/views/round_view.dart index 7c62120..2506cde 100644 --- a/lib/presentation/views/round_view.dart +++ b/lib/presentation/views/round_view.dart @@ -197,11 +197,13 @@ class _RoundViewState extends State { overflow: TextOverflow.ellipsis, ), Visibility( - visible: index == 0, + visible: + index == 0 && widget.roundNumber != 1, child: const SizedBox(width: 10), ), Visibility( - visible: index == 0, + visible: + index == 0 && widget.roundNumber != 1, child: const Icon(FontAwesomeIcons.medal, size: 15)) ])) diff --git a/pubspec.yaml b/pubspec.yaml index 6773a53..6b71a0f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,7 +2,7 @@ name: cabo_counter description: "Mobile app for the card game Cabo" publish_to: 'none' -version: 0.4.7+506 +version: 0.4.7+507 environment: sdk: ^3.5.4 From 77b551715fe6abca3b1bdc2481a0f215a87f206a Mon Sep 17 00:00:00 2001 From: Felix Kirchner Date: Wed, 16 Jul 2025 14:28:49 +0200 Subject: [PATCH 2/3] change not equal to greater than --- lib/presentation/views/round_view.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/presentation/views/round_view.dart b/lib/presentation/views/round_view.dart index 2506cde..a7ddde1 100644 --- a/lib/presentation/views/round_view.dart +++ b/lib/presentation/views/round_view.dart @@ -198,12 +198,12 @@ class _RoundViewState extends State { ), Visibility( visible: - index == 0 && widget.roundNumber != 1, + index == 0 && widget.roundNumber > 1, child: const SizedBox(width: 10), ), Visibility( visible: - index == 0 && widget.roundNumber != 1, + index == 0 && widget.roundNumber > 1, child: const Icon(FontAwesomeIcons.medal, size: 15)) ])) From 2033f43843450ae1aa4fa7e96d1b1fd8c976afe5 Mon Sep 17 00:00:00 2001 From: Felix Kirchner Date: Wed, 16 Jul 2025 14:32:40 +0200 Subject: [PATCH 3/3] Updated bool var --- lib/presentation/views/round_view.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/presentation/views/round_view.dart b/lib/presentation/views/round_view.dart index a7ddde1..9e2b40f 100644 --- a/lib/presentation/views/round_view.dart +++ b/lib/presentation/views/round_view.dart @@ -182,6 +182,8 @@ class _RoundViewState extends State { itemBuilder: (context, index) { final originalIndex = originalIndices[index]; final name = rotatedPlayers[index]; + bool shouldShowMedal = + index == 0 && widget.roundNumber > 1; return Padding( padding: const EdgeInsets.symmetric( vertical: 10, horizontal: 20), @@ -197,13 +199,11 @@ class _RoundViewState extends State { overflow: TextOverflow.ellipsis, ), Visibility( - visible: - index == 0 && widget.roundNumber > 1, + visible: shouldShowMedal, child: const SizedBox(width: 10), ), Visibility( - visible: - index == 0 && widget.roundNumber > 1, + visible: shouldShowMedal, child: const Icon(FontAwesomeIcons.medal, size: 15)) ]))