fixed back-navigation issues on newly created articles, by modifying history state on save

This commit is contained in:
Mia Rose Winter 2024-04-30 13:32:53 +02:00
parent 0ea1251150
commit 2eb1305ea5
Signed by: miawinter
GPG key ID: 4B6F6A83178F595E

View file

@ -262,6 +262,10 @@
} }
} }
Message.ShowSuccess(Localizer["Save_Success"]); Message.ShowSuccess(Localizer["Save_Success"]);
if (Navigation.Uri.EndsWith("/article/new")) {
Navigation.NavigateTo($"/article/{Article.Id}/edit", false, true);
}
} catch (Exception ex) { } catch (Exception ex) {
Message.ShowError(Localizer["Save_Error"]); Message.ShowError(Localizer["Save_Error"]);
Logger.LogError(ex, "Failed to save article."); Logger.LogError(ex, "Failed to save article.");