Tidy up profile picture setting & fix notification bug

This commit is contained in:
David Baker 2015-07-17 17:13:10 +01:00
parent 88167358bb
commit 214ef4b4ce
4 changed files with 4 additions and 16 deletions

View file

@ -55,9 +55,7 @@ module.exports = {
var self = this;
MatrixClientPeg.get().uploadContent(file).then(function(url) {
newUrl = url;
return MatrixClientPeg.get().setProfileInfo('avatar_url', {
avatar_url: url
});
return MatrixClientPeg.get().setAvatarUrl(url);
}).done(function() {
self.setState({
phase: self.Phases.Display,

View file

@ -50,16 +50,6 @@ module.exports = {
);
},
changeAvatarUrl: function(new_avatar_url) {
if (this.state.avatarUrl == new_avatar_url) return;
var self = this;
return MatrixClientPeg.get().setAvatarUrl(new_avatar_url).then(
function() { self.setState({displayName: new_displayname}); },
function(err) { console.err(err); }
);
},
componentWillMount: function() {
var self = this;
var cli = MatrixClientPeg.get();