mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-01 10:09:56 +00:00
Fix feedback on banning an unbanning
When banning or unbanning, the API call was done, but updating the frontend failed. This caused a confusing experience for an admin, until the page was reloaded.
This commit is contained in:
parent
28661dfacf
commit
8e2f83eb4e
1 changed files with 2 additions and 0 deletions
|
@ -205,6 +205,7 @@ export class Profile extends Component<
|
||||||
this.handleSavePost = this.handleSavePost.bind(this);
|
this.handleSavePost = this.handleSavePost.bind(this);
|
||||||
this.handlePurgePost = this.handlePurgePost.bind(this);
|
this.handlePurgePost = this.handlePurgePost.bind(this);
|
||||||
this.handleFeaturePost = this.handleFeaturePost.bind(this);
|
this.handleFeaturePost = this.handleFeaturePost.bind(this);
|
||||||
|
this.handleModBanSubmit = this.handleModBanSubmit.bind(this);
|
||||||
|
|
||||||
// Only fetch the data if coming from another route
|
// Only fetch the data if coming from another route
|
||||||
if (FirstLoadService.isFirstLoad) {
|
if (FirstLoadService.isFirstLoad) {
|
||||||
|
@ -987,6 +988,7 @@ export class Profile extends Component<
|
||||||
s.personRes.data.comments
|
s.personRes.data.comments
|
||||||
.filter(c => c.creator.id == banRes.data.person_view.person.id)
|
.filter(c => c.creator.id == banRes.data.person_view.person.id)
|
||||||
.forEach(c => (c.creator.banned = banRes.data.banned));
|
.forEach(c => (c.creator.banned = banRes.data.banned));
|
||||||
|
s.personRes.data.person_view.person.banned = banRes.data.banned;
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue