From 4a642244176765b07e234eadbb853742301f7e9e Mon Sep 17 00:00:00 2001 From: Yan Maniez Date: Fri, 5 Oct 2018 23:59:09 +0200 Subject: [PATCH] =?UTF-8?q?D=C3=A9but=20GTK?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AideDeJeu/MarkdownView/MarkdownView.cs | 29 ++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/AideDeJeu/AideDeJeu/MarkdownView/MarkdownView.cs b/AideDeJeu/AideDeJeu/MarkdownView/MarkdownView.cs index b757e6a2..3a0eb1a2 100644 --- a/AideDeJeu/AideDeJeu/MarkdownView/MarkdownView.cs +++ b/AideDeJeu/AideDeJeu/MarkdownView/MarkdownView.cs @@ -105,19 +105,22 @@ var blockLinks = links.Distinct().OrderBy(l => l.Key).ToList(); if (blockLinks.Count > 1) { - //view.GestureRecognizers.Add(new TapGestureRecognizer - //{ - // Command = new Command(async () => - // { - // try - // { - // var result = await Application.Current.MainPage.DisplayActionSheet("Ouvrir le lien", "Annuler", null, blockLinks.Select(x => x.Key).ToArray()); - // var link = blockLinks.FirstOrDefault(x => x.Key == result); - // NavigateToLinkCommand?.Execute(link.Value); - // } - // catch (Exception) { } - // }), - //}); + if (Device.RuntimePlatform == Device.GTK) + { + view.GestureRecognizers.Add(new TapGestureRecognizer + { + Command = new Command(async () => + { + try + { + var result = await Application.Current.MainPage.DisplayActionSheet("Ouvrir le lien", "Annuler", null, blockLinks.Select(x => x.Key).ToArray()); + var link = blockLinks.FirstOrDefault(x => x.Key == result); + NavigateToLinkCommand?.Execute(link.Value); + } + catch (Exception) { } + }), + }); + } } else {