fix : Edit d'une review qui est pas à soit impossible
continuous-integration/drone/push Build was killed Details

master
BelsethUwU 2 years ago
parent c8b55a9bc4
commit 700bd42f68

@ -50,11 +50,12 @@
<Label Grid.Column="1" Grid.Row="3" Text="{Binding Lien, FallbackValue='Default'}"/>
<local:StarsContainer Rate="{Binding Average, FallbackValue='0'}" Grid.Column="4" Grid.Row="3"/>
<VerticalStackLayout Grid.ColumnSpan="4" Grid.Row="4">
<ScrollView Grid.ColumnSpan="4" Grid.Row="4">
<VerticalStackLayout >
<Label Text="Avis de la communauté :" FontSize="30"/>
<CollectionView ItemsSource="{Binding Reviews}" ItemTemplate="{StaticResource reviewTemplate}"/>
</VerticalStackLayout>
</ScrollView>
</Grid>
</Grid>
</ScrollView>

@ -24,10 +24,14 @@ public partial class DetailledPage : ContentPage
}
private async void EditReview(object sender, EventArgs e)
{
if (((sender as ImageButton).BindingContext as Review).AuthorName == ((App)App.Current).Manager.CurrentUser.Username)
{
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é !"));
}
else await this.ShowPopupAsync(new MessagePopup("Ce commentaire ne vous appartiens pas"));
}
private async void RemoveReview(object sender, EventArgs e)

Loading…
Cancel
Save