From ec9ab1e23fce1bc029a253c278ba7fb3f04b6618 Mon Sep 17 00:00:00 2001 From: Liam Morrow Date: Sun, 20 Oct 2024 14:05:04 +1100 Subject: [PATCH] Clear the sessions when you navigate to the page --- LiftLog.Ui/Pages/Feed/FeedPage.razor | 1 + LiftLog.Ui/Pages/History/HistoryPage.razor | 1 + 2 files changed, 2 insertions(+) diff --git a/LiftLog.Ui/Pages/Feed/FeedPage.razor b/LiftLog.Ui/Pages/Feed/FeedPage.razor index 41cfdc4b..a667c814 100644 --- a/LiftLog.Ui/Pages/Feed/FeedPage.razor +++ b/LiftLog.Ui/Pages/Feed/FeedPage.razor @@ -136,6 +136,7 @@ Dispatcher.Dispatch(new FetchSessionFeedItemsAction(FromUserAction: false)); Dispatcher.Dispatch(new FetchInboxItemsAction(FromUserAction: false)); Dispatcher.Dispatch(new SetReopenCurrentSessionAction(SessionTarget.FeedSession, false)); + Dispatcher.Dispatch(new SetCurrentSessionAction(SessionTarget.FeedSession, null)); Dispatcher.Dispatch(new PublishUnpublishedSessionsAction()); if (FeedState.Value.Identity is null) { diff --git a/LiftLog.Ui/Pages/History/HistoryPage.razor b/LiftLog.Ui/Pages/History/HistoryPage.razor index 12f87cff..a621b531 100644 --- a/LiftLog.Ui/Pages/History/HistoryPage.razor +++ b/LiftLog.Ui/Pages/History/HistoryPage.razor @@ -107,6 +107,7 @@ else Dispatcher.Dispatch(new SetPageTitleAction("History")); Dispatcher.Dispatch(new SetBackNavigationUrlAction(null)); Dispatcher.Dispatch(new SetReopenCurrentSessionAction(SessionTarget.HistorySession, false)); + Dispatcher.Dispatch(new SetCurrentSessionAction(SessionTarget.HistorySession, null)); this._latestSessions = await SessionService .GetLatestSessionsAsync() .ToListAsync();