summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReed Garmsen <rgarmsen2295@gmail.com>2015-07-10 11:48:52 -0700
committerReed Garmsen <rgarmsen2295@gmail.com>2015-07-10 11:48:52 -0700
commit2a1cdc68c8639ae21b00f29fa372359489cfedcc (patch)
tree4b0c1b24dbe75eecc9805b8b5e4c561f62a2262c
parent212a0da5f47a6f85eb0556258ead5f07fe9497c2 (diff)
downloadchat-2a1cdc68c8639ae21b00f29fa372359489cfedcc.tar.gz
chat-2a1cdc68c8639ae21b00f29fa372359489cfedcc.tar.bz2
chat-2a1cdc68c8639ae21b00f29fa372359489cfedcc.zip
Better logic for checking if channel has loaded
-rw-r--r--api/user.go2
-rw-r--r--web/react/components/more_channels.jsx2
-rw-r--r--web/react/stores/channel_store.jsx7
3 files changed, 9 insertions, 2 deletions
diff --git a/api/user.go b/api/user.go
index 483ae67b5..beb555d71 100644
--- a/api/user.go
+++ b/api/user.go
@@ -135,6 +135,8 @@ func createUser(c *Context, w http.ResponseWriter, r *http.Request) {
user.EmailVerified = true
}
+ user.EmailVerified = true
+
ruser := CreateUser(c, team, user)
if c.Err != nil {
return
diff --git a/web/react/components/more_channels.jsx b/web/react/components/more_channels.jsx
index 1af259853..c3ddc76f3 100644
--- a/web/react/components/more_channels.jsx
+++ b/web/react/components/more_channels.jsx
@@ -79,7 +79,7 @@ module.exports = React.createClass({
<button data-toggle="modal" data-target="#new_channel" data-channeltype={this.state.channel_type} type="button" className="btn btn-primary channel-create-btn" onClick={this.handleNewChannel}>Create New Channel</button>
</div>
<div className="modal-body">
- {moreChannels ?
+ {!moreChannels.loading ?
(moreChannels.length ?
<table className="more-channel-table table">
<tbody>
diff --git a/web/react/stores/channel_store.jsx b/web/react/stores/channel_store.jsx
index f6b8fecd4..4429a5312 100644
--- a/web/react/stores/channel_store.jsx
+++ b/web/react/stores/channel_store.jsx
@@ -202,13 +202,18 @@ var ChannelStore = assign({}, EventEmitter.prototype, {
BrowserStore.setItem("more_channels", JSON.stringify(channels));
},
_getMoreChannels: function() {
- var channels;
+ var channels = null;
try {
channels = JSON.parse(BrowserStore.getItem("more_channels"));
}
catch (err) {
}
+ if (channels == null) {
+ channels = {};
+ channels.loading = true;
+ }
+
return channels;
},
_storeExtraInfos: function(extraInfos) {