summaryrefslogtreecommitdiffstats
path: root/webapp/stores
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-04-27 16:05:39 -0400
committerHarrison Healey <harrisonmhealey@gmail.com>2016-04-27 16:05:39 -0400
commit7695cbd1b4a62b1cc7c31b16f70309a287296385 (patch)
tree15a7f35bb56f0c72a9c13192380d795a48339d48 /webapp/stores
parentada513a0146cfb570e3614f9b26c0465de3a1d94 (diff)
downloadchat-7695cbd1b4a62b1cc7c31b16f70309a287296385.tar.gz
chat-7695cbd1b4a62b1cc7c31b16f70309a287296385.tar.bz2
chat-7695cbd1b4a62b1cc7c31b16f70309a287296385.zip
Add websocket event and cache invalidation for deleting channels (#2807)
Diffstat (limited to 'webapp/stores')
-rw-r--r--webapp/stores/team_store.jsx20
1 files changed, 7 insertions, 13 deletions
diff --git a/webapp/stores/team_store.jsx b/webapp/stores/team_store.jsx
index 356df7b07..29e832633 100644
--- a/webapp/stores/team_store.jsx
+++ b/webapp/stores/team_store.jsx
@@ -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();