mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Better logic for checking if channel has loaded
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user