mirror of
https://github.com/Nioux/AideDeJeu.git
synced 2025-10-29 14:35:45 +00:00
Tests push/pop
This commit is contained in:
parent
98f7aa09f9
commit
7479433922
3 changed files with 7 additions and 6 deletions
|
|
@ -4,6 +4,7 @@ using AideDeJeu.ViewModels.Library;
|
|||
using AideDeJeu.ViewModels.PlayerCharacter;
|
||||
using AideDeJeu.Views;
|
||||
using AideDeJeuLib;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Xamarin.Forms;
|
||||
|
|
|
|||
|
|
@ -239,7 +239,7 @@ namespace AideDeJeu.ViewModels
|
|||
|
||||
public async Task NavigateToLinkAsync(string s)
|
||||
{
|
||||
await Shell.Current.GoToAsync($"item?path={s}");
|
||||
await Shell.Current.Navigation.PushAsync(new ItemPage(s), true);//.GoToAsync($"item?path={Uri.EscapeDataString(s)}");
|
||||
return;
|
||||
if (s != null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -49,10 +49,10 @@ namespace AideDeJeu.Views.Library
|
|||
|
||||
public ItemPage(string id)
|
||||
{
|
||||
Path = id;
|
||||
BindingContext = this;
|
||||
InitializeComponent();
|
||||
LoadPageAsync();
|
||||
Path = id;
|
||||
//LoadPageAsync();
|
||||
}
|
||||
|
||||
protected override void OnAppearing()
|
||||
|
|
@ -78,7 +78,7 @@ namespace AideDeJeu.Views.Library
|
|||
private async Task LoadPageAsync()
|
||||
{
|
||||
var regex = new Regex("/?(?<file>.*?)(_with_(?<with>.*))?\\.md(#(?<anchor>.*))?");
|
||||
var match = regex.Match(Path);
|
||||
var match = regex.Match(Uri.UnescapeDataString(Path));
|
||||
var file = match.Groups["file"].Value;
|
||||
var anchor = match.Groups["anchor"].Value;
|
||||
var with = match.Groups["with"].Value;
|
||||
|
|
@ -126,13 +126,13 @@ namespace AideDeJeu.Views.Library
|
|||
|
||||
backingStore = value;
|
||||
onChanged?.Invoke();
|
||||
OnPropertyChanged(propertyName);
|
||||
CallOnPropertyChanged(propertyName);
|
||||
return true;
|
||||
}
|
||||
|
||||
#region INotifyPropertyChanged
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
protected void OnPropertyChanged([CallerMemberName] string propertyName = "")
|
||||
protected void CallOnPropertyChanged([CallerMemberName] string propertyName = "")
|
||||
{
|
||||
var changed = PropertyChanged;
|
||||
if (changed == null)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue