mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-22 20:31:13 +00:00
fix: Fix bug where old settings would linger on page until browser refresh (#2153)
This commit is contained in:
parent
951c8afebc
commit
36dc27f0cc
1 changed files with 11 additions and 0 deletions
|
@ -1376,6 +1376,17 @@ export class Settings extends Component<any, SettingsState> {
|
||||||
res: saveRes.data,
|
res: saveRes.data,
|
||||||
showToast: false,
|
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"));
|
toast(I18NextService.i18n.t("saved"));
|
||||||
window.scrollTo(0, 0);
|
window.scrollTo(0, 0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue