Browse Source

Also set sitemods

feature/settings-cleanup
Stalinist Apologist 2 years ago
parent
commit
f5620aa54d
  1. 2
      src/components/main.tsx
  2. 2
      src/components/post.tsx

2
src/components/main.tsx

@ -780,7 +780,7 @@ class Main extends Component<any, MainState> {
admins: data.admins
}
});
} else if (res.op == UserOperation.AddSitemod) {
} else if (res.op === UserOperation.AddSitemod) {
let data = res.data as AddSitemodResponse;
this.setState({
siteRes: {

2
src/components/post.tsx

@ -455,6 +455,7 @@ export class Post extends Component<any, PostState> {
this.state.community = data.community;
this.state.moderators = data.moderators;
this.state.siteRes.admins = data.admins;
this.state.siteRes.sitemods = data.sitemods;
this.state.online = data.online;
this.state.loading = false;
document.title = `${this.state.post.name} - ${this.state.siteRes.site.name}`;
@ -571,6 +572,7 @@ export class Post extends Component<any, PostState> {
this.state.community = data.community;
this.state.moderators = data.moderators;
this.state.siteRes.admins = data.admins;
this.state.siteRes.sitemods = data.sitemods;
this.setState(this.state);
}
}

Loading…
Cancel
Save