fix: Fix bug where old settings would linger on page until browser refresh (#2153)

This commit is contained in:
SleeplessOne1917 2023-09-28 12:11:49 +00:00 committed by GitHub
parent 951c8afebc
commit 36dc27f0cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1376,6 +1376,17 @@ export class Settings extends Component<any, SettingsState> {
res: saveRes.data,
showToast: false,
});
const siteRes = await HttpService.client.getSite();
if (siteRes.state === "success") {
i.setState({
siteRes: siteRes.data,
});
UserService.Instance.myUserInfo = siteRes.data.my_user;
}
toast(I18NextService.i18n.t("saved"));
window.scrollTo(0, 0);
}