Remove now redundant displayname stuff from UserSettings now it's in ChangeDisplayName
This commit is contained in:
parent
79e468217a
commit
05f7a3b4d1
1 changed files with 0 additions and 12 deletions
|
@ -26,7 +26,6 @@ module.exports = {
|
||||||
|
|
||||||
getInitialState: function() {
|
getInitialState: function() {
|
||||||
return {
|
return {
|
||||||
displayName: null,
|
|
||||||
avatarUrl: null,
|
avatarUrl: null,
|
||||||
threePids: [],
|
threePids: [],
|
||||||
clientVersion: version,
|
clientVersion: version,
|
||||||
|
@ -34,16 +33,6 @@ module.exports = {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
changeDisplayname: function(new_displayname) {
|
|
||||||
if (this.state.displayName == new_displayname) return;
|
|
||||||
|
|
||||||
var self = this;
|
|
||||||
return MatrixClientPeg.get().setDisplayName(new_displayname).then(
|
|
||||||
function() { self.setState({displayName: new_displayname}); },
|
|
||||||
function(err) { console.err(err); }
|
|
||||||
);
|
|
||||||
},
|
|
||||||
|
|
||||||
componentWillMount: function() {
|
componentWillMount: function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
var cli = MatrixClientPeg.get();
|
var cli = MatrixClientPeg.get();
|
||||||
|
@ -54,7 +43,6 @@ module.exports = {
|
||||||
q.all([profile_d, threepid_d]).then(
|
q.all([profile_d, threepid_d]).then(
|
||||||
function(resps) {
|
function(resps) {
|
||||||
self.setState({
|
self.setState({
|
||||||
displayName: resps[0].displayname,
|
|
||||||
avatarUrl: resps[0].avatar_url,
|
avatarUrl: resps[0].avatar_url,
|
||||||
threepids: resps[1].threepids,
|
threepids: resps[1].threepids,
|
||||||
phase: self.Phases.Display,
|
phase: self.Phases.Display,
|
||||||
|
|
Loading…
Add table
Reference in a new issue