Add websocket event and cache invalidation for deleting channels (#2807)

Этот коммит содержится в:
Joram Wilander
2016-04-27 16:05:39 -04:00
коммит произвёл Harrison Healey
родитель ada513a014
Коммит 7695cbd1b4
8 изменённых файлов: 68 добавлений и 35 удалений

Просмотреть файл

@@ -20,19 +20,6 @@ function getWindowLocationOrigin() {
class TeamStoreClass extends EventEmitter {
constructor() {
super();
this.emitChange = this.emitChange.bind(this);
this.addChangeListener = this.addChangeListener.bind(this);
this.removeChangeListener = this.removeChangeListener.bind(this);
this.get = this.get.bind(this);
this.getByName = this.getByName.bind(this);
this.getAll = this.getAll.bind(this);
this.getCurrentId = this.getCurrentId.bind(this);
this.getCurrent = this.getCurrent.bind(this);
this.getCurrentTeamUrl = this.getCurrentTeamUrl.bind(this);
this.getCurrentInviteLink = this.getCurrentInviteLink.bind(this);
this.saveTeam = this.saveTeam.bind(this);
this.clear();
}
@@ -104,6 +91,13 @@ class TeamStoreClass extends EventEmitter {
return null;
}
getCurrentTeamRelativeUrl() {
if (this.getCurrent()) {
return '/' + this.getCurrent().name;
}
return null;
}
getCurrentInviteLink() {
const current = this.getCurrent();