fix bug when deleting in discovery
continuous-integration/drone/push Build is passing Details

#MSG01/chat_firebase
Lucas DELANIER 2 years ago
parent e444f6cdea
commit 3c3ee6d7e9

@ -8,12 +8,10 @@ class Spot {
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is Spot &&
runtimeType == other.runtimeType &&
userId == other.userId &&
music == other.music;
runtimeType == other.runtimeType &&
userId == other.userId;
@override
int get hashCode => userId.hashCode ^ music.hashCode;
int get hashCode => music.hashCode;
}

@ -47,6 +47,7 @@ class User {
}
listSpots() {
print('ajout test');
Future<String> rep = Location.sendCurrentLocation();
//ex : dorian-2d2s52a15d2a5,audric-2x5s2az3d1s5wx5s1,lucas-s2a5d25a2a25d
@ -58,7 +59,9 @@ class User {
List<String> tab2 = element.split("-");
if (!spots.contains(Spot(tab2[0], Music(tab2[1])))) {
spots.add(Spot(tab2[0], Music(tab2[1])));
return;
}
print('deja présent');
}
});
}

@ -148,7 +148,6 @@ class _DiscoveryListState extends State<DiscoveryList> {
print(listDiscovery[reversedIndex].name);
MyApp.controller.currentUser.discovery
.remove(listDiscovery[reversedIndex]);
setState(() {});
return true;
}
if (direction == DismissDirection.startToEnd) {

@ -1,3 +1,4 @@
import 'dart:async';
import 'dart:ui';
import 'package:rive/rive.dart' as riv;

Loading…
Cancel
Save