diff --git a/Sources/Stim/DetailledPage.xaml b/Sources/Stim/DetailledPage.xaml
index e262a6c..ade0a4f 100644
--- a/Sources/Stim/DetailledPage.xaml
+++ b/Sources/Stim/DetailledPage.xaml
@@ -13,6 +13,7 @@
+
@@ -21,7 +22,7 @@
-
+
diff --git a/Sources/Stim/DetailledPage.xaml.cs b/Sources/Stim/DetailledPage.xaml.cs
index 13b4f7f..f7c5d8a 100644
--- a/Sources/Stim/DetailledPage.xaml.cs
+++ b/Sources/Stim/DetailledPage.xaml.cs
@@ -20,14 +20,25 @@ public partial class DetailledPage : ContentPage
private async void AddReview(object sender, EventArgs e)
{
var res = await this.ShowPopupAsync(new ReviewPopUp());
- if (res != null && res is int i && i == 1) await this.ShowPopupAsync(new MessagePopup("Commentaire ajouté !"));
+ if (res != null && res is int i && i == 1) await this.ShowPopupAsync(new MessagePopup("Commentaire ajouté !"));
}
private async void EditReview(object sender, EventArgs e)
{
var res = await this.ShowPopupAsync(new ReviewPopUp((sender as ImageButton).BindingContext as Review));
- if (res != null && res is int i && i == 2) await this.ShowPopupAsync(new MessagePopup("Commentaire modifié !"));
+ if (res != null && res is int i && i == 2) await this.ShowPopupAsync(new MessagePopup("Commentaire modifié !"));
}
+
+
+ private async void RemoveReview(object sender, EventArgs e)
+ {
+ var res = await this.ShowPopupAsync(new ConfirmationPopup("Voulez-vous vraiment supprimer votre commentaire ?"));
+ if (res != null && res is bool v && v)
+ {
+ (App.Current as App).Manager.SelectedGame.RemoveReview((sender as ImageButton).BindingContext as Review);
+ (App.Current as App).Manager.SaveGames();
+ await this.ShowPopupAsync(new MessagePopup("Commentaire supprimé !"));
+ }
}
private async void AddFollow(object sender, EventArgs e)