mirror of
https://github.com/Nioux/AideDeJeu.git
synced 2025-10-29 22:45:44 +00:00
Async
This commit is contained in:
parent
e28a4e419d
commit
86cfa659cc
1 changed files with 5 additions and 4 deletions
|
|
@ -10,10 +10,11 @@
|
|||
using System.IO;
|
||||
using Extensions;
|
||||
using Markdig;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
public class MarkdownView : ContentView
|
||||
{
|
||||
public Action<string> NavigateToLink { get; set; } = (s) => Device.OpenUri(new Uri(s));
|
||||
public Func<string, Task> NavigateToLink { get; set; } = async(s) => Device.OpenUri(new Uri(s));
|
||||
|
||||
public static MarkdownTheme Global = new LightMarkdownTheme();
|
||||
|
||||
|
|
@ -100,11 +101,11 @@
|
|||
{
|
||||
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);
|
||||
NavigateToLink(link.Value);
|
||||
await NavigateToLink(link.Value);
|
||||
}
|
||||
else
|
||||
{
|
||||
NavigateToLink(blockLinks.First().Value);
|
||||
await NavigateToLink(blockLinks.First().Value);
|
||||
}
|
||||
}
|
||||
catch (Exception) { }
|
||||
|
|
@ -123,7 +124,7 @@
|
|||
// {
|
||||
// try
|
||||
// {
|
||||
// NavigateToLink(link.Value);
|
||||
// await NavigateToLink(link.Value);
|
||||
// }
|
||||
// catch (Exception)
|
||||
// {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue