clear tag panel selection if the community selected is left
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
2aa7a6087c
commit
fa0f704b56
2 changed files with 16 additions and 3 deletions
|
@ -18,6 +18,7 @@ import EventEmitter from 'events';
|
|||
import { groupMemberFromApiObject, groupRoomFromApiObject } from '../groups';
|
||||
import FlairStore from './FlairStore';
|
||||
import {MatrixClientPeg} from '../MatrixClientPeg';
|
||||
import dis from '../dispatcher';
|
||||
|
||||
function parseMembersResponse(response) {
|
||||
return response.chunk.map((apiMember) => groupMemberFromApiObject(apiMember));
|
||||
|
@ -295,6 +296,11 @@ class GroupStore extends EventEmitter {
|
|||
}
|
||||
|
||||
leaveGroup(groupId) {
|
||||
// ensure the tag panel filter is cleared if the group was selected
|
||||
dis.dispatch({
|
||||
action: "deselect_tags",
|
||||
tag: groupId,
|
||||
});
|
||||
return MatrixClientPeg.get().leaveGroup(groupId)
|
||||
// The user should now not be able to access group settings
|
||||
.then(this._fetchResource.bind(this, this.STATE_KEY.Summary, groupId))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue