Merge pull request #120 from flixcoo/bug/119-rounds-with-same-name-get-both-deleted
Rounds with same name get both deleted #119
This commit is contained in:
@@ -126,7 +126,7 @@ class _MainMenuViewState extends State<MainMenuView> {
|
|||||||
listenable: session,
|
listenable: session,
|
||||||
builder: (context, _) {
|
builder: (context, _) {
|
||||||
return Dismissible(
|
return Dismissible(
|
||||||
key: Key(session.gameTitle),
|
key: Key(session.id),
|
||||||
background: Container(
|
background: Container(
|
||||||
color: CupertinoColors.destructiveRed,
|
color: CupertinoColors.destructiveRed,
|
||||||
alignment: Alignment.centerRight,
|
alignment: Alignment.centerRight,
|
||||||
@@ -139,14 +139,12 @@ class _MainMenuViewState extends State<MainMenuView> {
|
|||||||
),
|
),
|
||||||
direction: DismissDirection.endToStart,
|
direction: DismissDirection.endToStart,
|
||||||
confirmDismiss: (direction) async {
|
confirmDismiss: (direction) async {
|
||||||
final String gameTitle = gameManager
|
|
||||||
.gameList[index].gameTitle;
|
|
||||||
return await _showDeleteGamePopup(
|
return await _showDeleteGamePopup(
|
||||||
context, gameTitle);
|
context, session.gameTitle);
|
||||||
},
|
},
|
||||||
onDismissed: (direction) {
|
onDismissed: (direction) {
|
||||||
gameManager
|
gameManager
|
||||||
.removeGameSessionByIndex(index);
|
.removeGameSessionById(session.id);
|
||||||
},
|
},
|
||||||
dismissThresholds: const {
|
dismissThresholds: const {
|
||||||
DismissDirection.startToEnd: 0.6
|
DismissDirection.startToEnd: 0.6
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ name: cabo_counter
|
|||||||
description: "Mobile app for the card game Cabo"
|
description: "Mobile app for the card game Cabo"
|
||||||
publish_to: 'none'
|
publish_to: 'none'
|
||||||
|
|
||||||
version: 0.4.7+507
|
version: 0.4.7+509
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ^3.5.4
|
sdk: ^3.5.4
|
||||||
|
|||||||
Reference in New Issue
Block a user