From b42bf2023dffb2da52aadf9cd9491cdc958361f3 Mon Sep 17 00:00:00 2001 From: Gordon Pedersen Date: Thu, 4 Jul 2024 10:21:25 +1000 Subject: [PATCH] Fixed feed icon not appearing +version bump --- Classes/State.cs | 9 +++++++- Components/Layout/NavLinks.razor | 20 +++++++++++++---- Neighbourhood.omg.lol.csproj | 32 +++++++++++++-------------- Platforms/Android/AndroidManifest.xml | 2 +- 4 files changed, 41 insertions(+), 22 deletions(-) diff --git a/Classes/State.cs b/Classes/State.cs index e8e85bf..5f8d13a 100644 --- a/Classes/State.cs +++ b/Classes/State.cs @@ -27,7 +27,14 @@ namespace Neighbourhood.omg.lol { public List? Feed { get; set; } // Account data - public AccountResponseData? AccountInfo { get; set; } + private AccountResponseData? _accountInfo; + public AccountResponseData? AccountInfo { + get => _accountInfo; + set { + _accountInfo = value; + OnPropertyChanged(nameof(AccountInfo)); + } + } public AddressResponseList? AddressList { get; set; } public bool IsAuthorized { get => AccountInfo != null; } diff --git a/Components/Layout/NavLinks.razor b/Components/Layout/NavLinks.razor index 770612e..6f7b164 100644 --- a/Components/Layout/NavLinks.razor +++ b/Components/Layout/NavLinks.razor @@ -27,10 +27,22 @@ else {
Now.garden
} - - -
Directory
-
\ No newline at end of file + + +@code { + protected override async Task OnInitializedAsync() { + await base.OnInitializedAsync(); + State.PropertyChanged += StateChanged; + } + + private async void StateChanged(object? sender, PropertyChangedEventArgs e) { + if (e.PropertyName == nameof(State.AccountInfo)) await InvokeAsync(StateHasChanged); + } + + public void Dispose() { + State.PropertyChanged -= StateChanged; + } +} \ No newline at end of file diff --git a/Neighbourhood.omg.lol.csproj b/Neighbourhood.omg.lol.csproj index 0bdc943..2fcffe5 100644 --- a/Neighbourhood.omg.lol.csproj +++ b/Neighbourhood.omg.lol.csproj @@ -43,22 +43,22 @@ au.death.lol.omg.neighbourhood - 0.9.3 - 5 + 0.9.4 + 6 au.death.lol.omg.neighbourhood - 0.9.3 - 5 + 0.9.4 + 6 au.death.lol.omg.neighbourhood - 0.9.3 + 0.9.4 True D:\Neighbourhood.omg.lol\neighbourhood.omg.lol.keystore - 5 + 6 a!zobzizl neighbourhood.omg.lol a!zobzizl @@ -66,32 +66,32 @@ au.death.lol.omg.neighbourhood - 0.9.3 - 5 + 0.9.4 + 6 au.death.lol.omg.neighbourhood - 0.9.3 - 5 + 0.9.4 + 6 au.death.lol.omg.neighbourhood - 0.9.3 - 5 + 0.9.4 + 6 au.death.lol.omg.neighbourhood - 0.9.3 - 5 + 0.9.4 + 6 au.death.lol.omg.neighbourhood - 0.9.3 - 5 + 0.9.4 + 6 diff --git a/Platforms/Android/AndroidManifest.xml b/Platforms/Android/AndroidManifest.xml index cf6d911..efdd388 100644 --- a/Platforms/Android/AndroidManifest.xml +++ b/Platforms/Android/AndroidManifest.xml @@ -1,5 +1,5 @@  - +