? feed;
+ protected override async Task OnInitializedAsync() {
+ await base.OnInitializedAsync();
+ if (feed == null || feed.Count() == 0) feed = await State.GetFeed();
+ State.PropertyChanged += StateChanged;
+ State.CanRefresh = true;
+ await InvokeAsync(StateHasChanged);
+ await JS.InvokeVoidAsync("removeElementById", "feedLoading");
+ }
+
+ private async void StateChanged(object? sender, PropertyChangedEventArgs e) {
+ if (e.PropertyName == nameof(State.IsRefreshing) && State.IsRefreshing) {
+ using (State.GetRefreshToken()) {
+ feed = await State.GetFeed(true);
+ await InvokeAsync(StateHasChanged);
+ }
+ }
+ }
+
+ public void Dispose() {
+ State.PropertyChanged -= StateChanged;
+ State.CanRefresh = false;
+ }
}
diff --git a/Components/Pages/Person.razor b/Components/Pages/Person.razor
index 802a8e8..b60e1ba 100644
--- a/Components/Pages/Person.razor
+++ b/Components/Pages/Person.razor
@@ -5,14 +5,27 @@
-
@Address
-
+@if (State.FeatureFollowing)
+{
+
+ @if (State.IsFollowing(Address)) {
+
+ }
+ else {
+
+ }
+
+}