Merge branch 'master' of https://github.com/mattermost/platform
Этот коммит содержится в:
@@ -593,7 +593,7 @@ func createProfileImage(username string, userId string) ([]byte, *model.AppError
|
|||||||
h.Write([]byte(userId))
|
h.Write([]byte(userId))
|
||||||
seed := h.Sum32()
|
seed := h.Sum32()
|
||||||
|
|
||||||
color := colors[int(seed)%len(colors)]
|
color := colors[int64(seed)%int64(len(colors))]
|
||||||
img := image.NewRGBA(image.Rect(0, 0, int(utils.Cfg.ImageSettings.ProfileWidth), int(utils.Cfg.ImageSettings.ProfileHeight)))
|
img := image.NewRGBA(image.Rect(0, 0, int(utils.Cfg.ImageSettings.ProfileWidth), int(utils.Cfg.ImageSettings.ProfileHeight)))
|
||||||
draw.Draw(img, img.Bounds(), &image.Uniform{color}, image.ZP, draw.Src)
|
draw.Draw(img, img.Bounds(), &image.Uniform{color}, image.ZP, draw.Src)
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,11 @@ module.exports = React.createClass({
|
|||||||
componentDidMount: function() {
|
componentDidMount: function() {
|
||||||
SocketStore.addChangeListener(this._onChange);
|
SocketStore.addChangeListener(this._onChange);
|
||||||
},
|
},
|
||||||
|
componentWillReceiveProps: function(newProps) {
|
||||||
|
if(this.props.channelId !== newProps.channelId) {
|
||||||
|
this.setState({text:""});
|
||||||
|
}
|
||||||
|
},
|
||||||
componentWillUnmount: function() {
|
componentWillUnmount: function() {
|
||||||
SocketStore.removeChangeListener(this._onChange);
|
SocketStore.removeChangeListener(this._onChange);
|
||||||
},
|
},
|
||||||
@@ -37,6 +42,9 @@ module.exports = React.createClass({
|
|||||||
}, 3000);
|
}, 3000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (msg.action == "posted" && msg.channel_id === this.props.channelId) {
|
||||||
|
this.setState({text:""})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
getInitialState: function() {
|
getInitialState: function() {
|
||||||
return { text: "" };
|
return { text: "" };
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user