do inscremental updates instead of full updates
This commit is contained in:
@@ -60,7 +60,7 @@ export default class EditAccountView extends React.Component {
|
||||
|
||||
handleFullNameUpdate(fn) {
|
||||
this.setState({fullName: fn});
|
||||
this.props.onUpdateAccount(undefined, vcard(fn, this.state.avatar));
|
||||
this.props.onUpdateAccount(undefined, vcard(fn, null));
|
||||
}
|
||||
|
||||
handlePasswordUpdate(pwd) {
|
||||
@@ -70,7 +70,7 @@ export default class EditAccountView extends React.Component {
|
||||
|
||||
handleImageChanged(img) {
|
||||
this.setState({avatar: img});
|
||||
this.props.onUpdateAccount(undefined, vcard(this.state.fullName, img));
|
||||
this.props.onUpdateAccount(undefined, vcard(null, img));
|
||||
}
|
||||
|
||||
handleCheckboxClick(what, checked) {
|
||||
|
||||
@@ -220,26 +220,20 @@ class InfoView extends React.Component {
|
||||
fn = fn.trim();
|
||||
if (this.state.fullName !== fn) {
|
||||
this.setState({fullName: fn});
|
||||
this.props.onTopicDescUpdate(this.props.topic,
|
||||
vcard(fn, this.state.avatar),
|
||||
null);
|
||||
this.props.onTopicDescUpdate(this.props.topic, vcard(fn, null), null);
|
||||
}
|
||||
}
|
||||
|
||||
handlePrivateUpdate(priv) {
|
||||
if (this.state.priv !== priv) {
|
||||
this.setState({private: priv});
|
||||
this.props.onTopicDescUpdate(this.props.topic,
|
||||
null,
|
||||
priv || Tinode.DEL_CHAR);
|
||||
this.props.onTopicDescUpdate(this.props.topic, null, priv || Tinode.DEL_CHAR);
|
||||
}
|
||||
}
|
||||
|
||||
handleImageChanged(img) {
|
||||
this.setState({avatar: img});
|
||||
this.props.onTopicDescUpdate(this.props.topic,
|
||||
vcard(this.state.fullName, img),
|
||||
null);
|
||||
this.props.onTopicDescUpdate(this.props.topic, vcard(null, img), null);
|
||||
}
|
||||
|
||||
handleMuted(ignored, checked) {
|
||||
|
||||
Reference in New Issue
Block a user