change method signatures to make TopicCommonView usable in INfoView
This commit is contained in:
@@ -46,7 +46,7 @@ class AccSecurityView extends React.Component {
|
|||||||
|
|
||||||
handlePasswordUpdate(pwd) {
|
handlePasswordUpdate(pwd) {
|
||||||
this.setState({password: pwd});
|
this.setState({password: pwd});
|
||||||
this.props.onUpdateAccount(pwd);
|
this.props.onUpdatePassword(pwd);
|
||||||
}
|
}
|
||||||
|
|
||||||
handleLaunchPermissionsEditor(which) {
|
handleLaunchPermissionsEditor(which) {
|
||||||
@@ -63,7 +63,7 @@ class AccSecurityView extends React.Component {
|
|||||||
handlePermissionsChanged(perm) {
|
handlePermissionsChanged(perm) {
|
||||||
let defacs = {};
|
let defacs = {};
|
||||||
defacs[this.state.showPermissionEditorFor] = perm;
|
defacs[this.state.showPermissionEditorFor] = perm;
|
||||||
this.props.onUpdateAccount(undefined, undefined, defacs);
|
this.props.onUpdateAccountDesc('me', undefined, undefined, defacs);
|
||||||
|
|
||||||
let newState = {showPermissionEditorFor: undefined};
|
let newState = {showPermissionEditorFor: undefined};
|
||||||
newState[this.state.showPermissionEditorFor] = perm;
|
newState[this.state.showPermissionEditorFor] = perm;
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ class SidepanelView extends React.Component {
|
|||||||
tinode={this.props.tinode}
|
tinode={this.props.tinode}
|
||||||
myUserId={this.props.myUserId}
|
myUserId={this.props.myUserId}
|
||||||
onBasicNavigate={this.props.onBasicNavigate}
|
onBasicNavigate={this.props.onBasicNavigate}
|
||||||
onUpdateAccount={this.props.onUpdateAccount}
|
onUpdateTopicDesc={this.props.onUpdateAccountDesc}
|
||||||
onUpdateTags={this.props.onUpdateAccountTags}
|
onUpdateTags={this.props.onUpdateAccountTags}
|
||||||
onCredAdd={this.props.onCredAdd}
|
onCredAdd={this.props.onCredAdd}
|
||||||
onCredDelete={this.props.onCredDelete}
|
onCredDelete={this.props.onCredDelete}
|
||||||
@@ -201,7 +201,8 @@ class SidepanelView extends React.Component {
|
|||||||
view === 'security' ?
|
view === 'security' ?
|
||||||
<AccSecurityView
|
<AccSecurityView
|
||||||
tinode={this.props.tinode}
|
tinode={this.props.tinode}
|
||||||
onUpdateAccount={this.props.onUpdateAccount}
|
onUpdateAccountDesc={this.props.onUpdateAccountDesc}
|
||||||
|
onUpdatePassword={this.props.onUpdatePassword}
|
||||||
onLogout={this.props.onLogout}
|
onLogout={this.props.onLogout}
|
||||||
onDeleteAccount={this.props.onDeleteAccount}
|
onDeleteAccount={this.props.onDeleteAccount}
|
||||||
onShowAlert={this.props.onShowAlert}
|
onShowAlert={this.props.onShowAlert}
|
||||||
|
|||||||
+25
-33
@@ -1,6 +1,5 @@
|
|||||||
// The top-level class to hold all functionality together.
|
// The top-level class to hold all functionality together.
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import ReactDOM from 'react-dom';
|
|
||||||
import { FormattedMessage, defineMessages, injectIntl } from 'react-intl';
|
import { FormattedMessage, defineMessages, injectIntl } from 'react-intl';
|
||||||
|
|
||||||
import * as firebase from 'firebase/app';
|
import * as firebase from 'firebase/app';
|
||||||
@@ -70,6 +69,8 @@ class TinodeWeb extends React.Component {
|
|||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
|
this.selfRef = React.createRef();
|
||||||
|
|
||||||
this.state = this.getBlankState();
|
this.state = this.getBlankState();
|
||||||
|
|
||||||
this.handleResize = this.handleResize.bind(this);
|
this.handleResize = this.handleResize.bind(this);
|
||||||
@@ -100,7 +101,7 @@ class TinodeWeb extends React.Component {
|
|||||||
this.handleNewChatInvitation = this.handleNewChatInvitation.bind(this);
|
this.handleNewChatInvitation = this.handleNewChatInvitation.bind(this);
|
||||||
this.handleNewAccount = this.handleNewAccount.bind(this);
|
this.handleNewAccount = this.handleNewAccount.bind(this);
|
||||||
this.handleNewAccountRequest = this.handleNewAccountRequest.bind(this);
|
this.handleNewAccountRequest = this.handleNewAccountRequest.bind(this);
|
||||||
this.handleUpdateAccountRequest = this.handleUpdateAccountRequest.bind(this);
|
this.handleUpdatePasswordRequest = this.handleUpdatePasswordRequest.bind(this);
|
||||||
this.handleUpdateAccountTagsRequest = this.handleUpdateAccountTagsRequest.bind(this);
|
this.handleUpdateAccountTagsRequest = this.handleUpdateAccountTagsRequest.bind(this);
|
||||||
this.handleToggleIncognitoMode = this.handleToggleIncognitoMode.bind(this);
|
this.handleToggleIncognitoMode = this.handleToggleIncognitoMode.bind(this);
|
||||||
this.handleSettings = this.handleSettings.bind(this);
|
this.handleSettings = this.handleSettings.bind(this);
|
||||||
@@ -980,31 +981,6 @@ class TinodeWeb extends React.Component {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
handleUpdateAccountRequest(password, pub, defacs) {
|
|
||||||
this.handleError();
|
|
||||||
|
|
||||||
if (pub || defacs) {
|
|
||||||
const params = {};
|
|
||||||
if (pub) {
|
|
||||||
params.public = pub;
|
|
||||||
if (pub.photo && pub.photo.ref) {
|
|
||||||
params.attachments = [pub.photo.ref];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (defacs) {
|
|
||||||
params.defacs = defacs;
|
|
||||||
}
|
|
||||||
this.tinode.getMeTopic().setMeta({desc: params}).catch((err) => {
|
|
||||||
this.handleError(err.message, 'err');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (password) {
|
|
||||||
this.tinode.updateAccountBasic(null, this.tinode.getCurrentLogin(), password).catch((err) => {
|
|
||||||
this.handleError(err.message, 'err');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
handleToggleIncognitoMode(on) {
|
handleToggleIncognitoMode(on) {
|
||||||
const me = this.tinode.getMeTopic();
|
const me = this.tinode.getMeTopic();
|
||||||
const am = me.getAccessMode().updateWant(on ? '-P' : '+P').getWant();
|
const am = me.getAccessMode().updateWant(on ? '-P' : '+P').getWant();
|
||||||
@@ -1212,19 +1188,24 @@ class TinodeWeb extends React.Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
handleTopicUpdateRequest(topicName, pub, priv, permissions) {
|
handleTopicUpdateRequest(topicName, pub, priv, defacs) {
|
||||||
|
this.handleError();
|
||||||
|
|
||||||
const topic = this.tinode.getTopic(topicName);
|
const topic = this.tinode.getTopic(topicName);
|
||||||
if (topic) {
|
if (topic) {
|
||||||
const params = {};
|
const params = {};
|
||||||
if (pub) {
|
if (pub) {
|
||||||
params.public = pub;
|
params.public = pub;
|
||||||
|
if (pub.photo && pub.photo.ref) {
|
||||||
|
params.attachments = [pub.photo.ref];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (priv) {
|
if (priv) {
|
||||||
params.private = (priv === Tinode.DEL_CHAR) ?
|
params.private = (priv === Tinode.DEL_CHAR) ?
|
||||||
Tinode.DEL_CHAR : {comment: priv};
|
Tinode.DEL_CHAR : {comment: priv};
|
||||||
}
|
}
|
||||||
if (permissions) {
|
if (defacs) {
|
||||||
params.defacs = permissions;
|
params.defacs = defacs;
|
||||||
}
|
}
|
||||||
topic.setMeta({desc: params}).catch((err) => {
|
topic.setMeta({desc: params}).catch((err) => {
|
||||||
this.handleError(err.message, 'err');
|
this.handleError(err.message, 'err');
|
||||||
@@ -1232,6 +1213,16 @@ class TinodeWeb extends React.Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
handleUpdatePasswordRequest(password) {
|
||||||
|
this.handleError();
|
||||||
|
|
||||||
|
if (password) {
|
||||||
|
this.tinode.updateAccountBasic(null, this.tinode.getCurrentLogin(), password).catch((err) => {
|
||||||
|
this.handleError(err.message, 'err');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
handleChangePermissions(topicName, mode, uid) {
|
handleChangePermissions(topicName, mode, uid) {
|
||||||
const topic = this.tinode.getTopic(topicName);
|
const topic = this.tinode.getTopic(topicName);
|
||||||
if (topic) {
|
if (topic) {
|
||||||
@@ -1359,7 +1350,7 @@ class TinodeWeb extends React.Component {
|
|||||||
contextMenuClickAt: {x: params.x, y: params.y},
|
contextMenuClickAt: {x: params.x, y: params.y},
|
||||||
contextMenuParams: params,
|
contextMenuParams: params,
|
||||||
contextMenuItems: menuItems || this.defaultTopicContextMenu(params.topicName),
|
contextMenuItems: menuItems || this.defaultTopicContextMenu(params.topicName),
|
||||||
contextMenuBounds: ReactDOM.findDOMNode(this).getBoundingClientRect()
|
contextMenuBounds: this.selfRef.getBoundingClientRect()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1510,7 +1501,7 @@ class TinodeWeb extends React.Component {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div id="app-container">
|
<div id="app-container" ref={this.selfRef}>
|
||||||
{this.state.contextMenuVisible ?
|
{this.state.contextMenuVisible ?
|
||||||
<ContextMenu
|
<ContextMenu
|
||||||
tinode={this.tinode}
|
tinode={this.tinode}
|
||||||
@@ -1579,7 +1570,8 @@ class TinodeWeb extends React.Component {
|
|||||||
onLoginRequest={this.handleLoginRequest}
|
onLoginRequest={this.handleLoginRequest}
|
||||||
onPersistenceChange={this.handlePersistenceChange}
|
onPersistenceChange={this.handlePersistenceChange}
|
||||||
onCreateAccount={this.handleNewAccountRequest}
|
onCreateAccount={this.handleNewAccountRequest}
|
||||||
onUpdateAccount={this.handleUpdateAccountRequest}
|
onUpdateAccountDesc={this.handleTopicUpdateRequest}
|
||||||
|
onUpdatePassword={this.handleUpdatePasswordRequest}
|
||||||
onUpdateAccountTags={this.handleUpdateAccountTagsRequest}
|
onUpdateAccountTags={this.handleUpdateAccountTagsRequest}
|
||||||
onTogglePushNotifications={this.togglePushToken}
|
onTogglePushNotifications={this.togglePushToken}
|
||||||
onToggleMessageSounds={this.handleToggleMessageSounds}
|
onToggleMessageSounds={this.handleToggleMessageSounds}
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ export default class TopicCommonView extends React.Component {
|
|||||||
fn = fn.trim().substring(0, MAX_TITLE_LENGTH);
|
fn = fn.trim().substring(0, MAX_TITLE_LENGTH);
|
||||||
if (fn) {
|
if (fn) {
|
||||||
this.setState({fullName: fn});
|
this.setState({fullName: fn});
|
||||||
this.props.onUpdateAccount(undefined, theCard(fn, null));
|
this.props.onUpdateTopicDesc(this.props.topic, theCard(fn, null));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -81,7 +81,7 @@ export default class TopicCommonView extends React.Component {
|
|||||||
this.setState({newAvatar: img, newAvatarMime: mime});
|
this.setState({newAvatar: img, newAvatarMime: mime});
|
||||||
if (!img) {
|
if (!img) {
|
||||||
// Deleting the avatar.
|
// Deleting the avatar.
|
||||||
this.props.onUpdateAccount(undefined, theCard(null, Tinode.DEL_CHAR));
|
this.props.onUpdateTopicDesc(this.props.topic, theCard(null, Tinode.DEL_CHAR));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -105,7 +105,7 @@ export default class TopicCommonView extends React.Component {
|
|||||||
this.setState({uploading: true});
|
this.setState({uploading: true});
|
||||||
uploader.upload(blob)
|
uploader.upload(blob)
|
||||||
.then((url) => {
|
.then((url) => {
|
||||||
this.props.onUpdateAccount(undefined, theCard(null, url));
|
this.props.onUpdateTopicDesc(this.props.topic, theCard(null, url));
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
this.props.onError(err, 'err');
|
this.props.onError(err, 'err');
|
||||||
@@ -119,7 +119,7 @@ export default class TopicCommonView extends React.Component {
|
|||||||
blobToBase64(blob, (unused, base64bits) => {
|
blobToBase64(blob, (unused, base64bits) => {
|
||||||
const du = makeImageUrl({data: base64bits, type: mime});
|
const du = makeImageUrl({data: base64bits, type: mime});
|
||||||
this.setState({source: du});
|
this.setState({source: du});
|
||||||
this.props.onUpdateAccount(undefined, theCard(null, du));
|
this.props.onUpdateTopicDesc(this.props.topic, theCard(null, du));
|
||||||
this.setState({uploading: false});
|
this.setState({uploading: false});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
+30
-45
@@ -921,7 +921,7 @@ class AccSecurityView extends (react__WEBPACK_IMPORTED_MODULE_0___default().Comp
|
|||||||
this.setState({
|
this.setState({
|
||||||
password: pwd
|
password: pwd
|
||||||
});
|
});
|
||||||
this.props.onUpdateAccount(pwd);
|
this.props.onUpdatePassword(pwd);
|
||||||
}
|
}
|
||||||
|
|
||||||
handleLaunchPermissionsEditor(which) {
|
handleLaunchPermissionsEditor(which) {
|
||||||
@@ -940,7 +940,7 @@ class AccSecurityView extends (react__WEBPACK_IMPORTED_MODULE_0___default().Comp
|
|||||||
handlePermissionsChanged(perm) {
|
handlePermissionsChanged(perm) {
|
||||||
let defacs = {};
|
let defacs = {};
|
||||||
defacs[this.state.showPermissionEditorFor] = perm;
|
defacs[this.state.showPermissionEditorFor] = perm;
|
||||||
this.props.onUpdateAccount(undefined, undefined, defacs);
|
this.props.onUpdateAccountDesc('me', undefined, undefined, defacs);
|
||||||
let newState = {
|
let newState = {
|
||||||
showPermissionEditorFor: undefined
|
showPermissionEditorFor: undefined
|
||||||
};
|
};
|
||||||
@@ -4616,7 +4616,7 @@ class SidepanelView extends (react__WEBPACK_IMPORTED_MODULE_0___default().Compon
|
|||||||
tinode: this.props.tinode,
|
tinode: this.props.tinode,
|
||||||
myUserId: this.props.myUserId,
|
myUserId: this.props.myUserId,
|
||||||
onBasicNavigate: this.props.onBasicNavigate,
|
onBasicNavigate: this.props.onBasicNavigate,
|
||||||
onUpdateAccount: this.props.onUpdateAccount,
|
onUpdateTopicDesc: this.props.onUpdateAccountDesc,
|
||||||
onUpdateTags: this.props.onUpdateAccountTags,
|
onUpdateTags: this.props.onUpdateAccountTags,
|
||||||
onCredAdd: this.props.onCredAdd,
|
onCredAdd: this.props.onCredAdd,
|
||||||
onCredDelete: this.props.onCredDelete,
|
onCredDelete: this.props.onCredDelete,
|
||||||
@@ -4632,7 +4632,8 @@ class SidepanelView extends (react__WEBPACK_IMPORTED_MODULE_0___default().Compon
|
|||||||
onToggleIncognitoMode: this.props.onToggleIncognitoMode
|
onToggleIncognitoMode: this.props.onToggleIncognitoMode
|
||||||
}) : view === 'security' ? react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_acc_security_view_jsx__WEBPACK_IMPORTED_MODULE_10__.default, {
|
}) : view === 'security' ? react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_acc_security_view_jsx__WEBPACK_IMPORTED_MODULE_10__.default, {
|
||||||
tinode: this.props.tinode,
|
tinode: this.props.tinode,
|
||||||
onUpdateAccount: this.props.onUpdateAccount,
|
onUpdateAccountDesc: this.props.onUpdateAccountDesc,
|
||||||
|
onUpdatePassword: this.props.onUpdatePassword,
|
||||||
onLogout: this.props.onLogout,
|
onLogout: this.props.onLogout,
|
||||||
onDeleteAccount: this.props.onDeleteAccount,
|
onDeleteAccount: this.props.onDeleteAccount,
|
||||||
onShowAlert: this.props.onShowAlert,
|
onShowAlert: this.props.onShowAlert,
|
||||||
@@ -4822,7 +4823,7 @@ class TinodeWeb extends (react__WEBPACK_IMPORTED_MODULE_0___default().Component)
|
|||||||
this.handleNewChatInvitation = this.handleNewChatInvitation.bind(this);
|
this.handleNewChatInvitation = this.handleNewChatInvitation.bind(this);
|
||||||
this.handleNewAccount = this.handleNewAccount.bind(this);
|
this.handleNewAccount = this.handleNewAccount.bind(this);
|
||||||
this.handleNewAccountRequest = this.handleNewAccountRequest.bind(this);
|
this.handleNewAccountRequest = this.handleNewAccountRequest.bind(this);
|
||||||
this.handleUpdateAccountRequest = this.handleUpdateAccountRequest.bind(this);
|
this.handleUpdatePasswordRequest = this.handleUpdatePasswordRequest.bind(this);
|
||||||
this.handleUpdateAccountTagsRequest = this.handleUpdateAccountTagsRequest.bind(this);
|
this.handleUpdateAccountTagsRequest = this.handleUpdateAccountTagsRequest.bind(this);
|
||||||
this.handleToggleIncognitoMode = this.handleToggleIncognitoMode.bind(this);
|
this.handleToggleIncognitoMode = this.handleToggleIncognitoMode.bind(this);
|
||||||
this.handleSettings = this.handleSettings.bind(this);
|
this.handleSettings = this.handleSettings.bind(this);
|
||||||
@@ -5690,38 +5691,6 @@ class TinodeWeb extends (react__WEBPACK_IMPORTED_MODULE_0___default().Component)
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
handleUpdateAccountRequest(password, pub, defacs) {
|
|
||||||
this.handleError();
|
|
||||||
|
|
||||||
if (pub || defacs) {
|
|
||||||
const params = {};
|
|
||||||
|
|
||||||
if (pub) {
|
|
||||||
params.public = pub;
|
|
||||||
|
|
||||||
if (pub.photo && pub.photo.ref) {
|
|
||||||
params.attachments = [pub.photo.ref];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (defacs) {
|
|
||||||
params.defacs = defacs;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.tinode.getMeTopic().setMeta({
|
|
||||||
desc: params
|
|
||||||
}).catch(err => {
|
|
||||||
this.handleError(err.message, 'err');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (password) {
|
|
||||||
this.tinode.updateAccountBasic(null, this.tinode.getCurrentLogin(), password).catch(err => {
|
|
||||||
this.handleError(err.message, 'err');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
handleToggleIncognitoMode(on) {
|
handleToggleIncognitoMode(on) {
|
||||||
const me = this.tinode.getMeTopic();
|
const me = this.tinode.getMeTopic();
|
||||||
const am = me.getAccessMode().updateWant(on ? '-P' : '+P').getWant();
|
const am = me.getAccessMode().updateWant(on ? '-P' : '+P').getWant();
|
||||||
@@ -5976,7 +5945,8 @@ class TinodeWeb extends (react__WEBPACK_IMPORTED_MODULE_0___default().Component)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
handleTopicUpdateRequest(topicName, pub, priv, permissions) {
|
handleTopicUpdateRequest(topicName, pub, priv, defacs) {
|
||||||
|
this.handleError();
|
||||||
const topic = this.tinode.getTopic(topicName);
|
const topic = this.tinode.getTopic(topicName);
|
||||||
|
|
||||||
if (topic) {
|
if (topic) {
|
||||||
@@ -5984,6 +5954,10 @@ class TinodeWeb extends (react__WEBPACK_IMPORTED_MODULE_0___default().Component)
|
|||||||
|
|
||||||
if (pub) {
|
if (pub) {
|
||||||
params.public = pub;
|
params.public = pub;
|
||||||
|
|
||||||
|
if (pub.photo && pub.photo.ref) {
|
||||||
|
params.attachments = [pub.photo.ref];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (priv) {
|
if (priv) {
|
||||||
@@ -5992,8 +5966,8 @@ class TinodeWeb extends (react__WEBPACK_IMPORTED_MODULE_0___default().Component)
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (permissions) {
|
if (defacs) {
|
||||||
params.defacs = permissions;
|
params.defacs = defacs;
|
||||||
}
|
}
|
||||||
|
|
||||||
topic.setMeta({
|
topic.setMeta({
|
||||||
@@ -6004,6 +5978,16 @@ class TinodeWeb extends (react__WEBPACK_IMPORTED_MODULE_0___default().Component)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
handleUpdatePasswordRequest(password) {
|
||||||
|
this.handleError();
|
||||||
|
|
||||||
|
if (password) {
|
||||||
|
this.tinode.updateAccountBasic(null, this.tinode.getCurrentLogin(), password).catch(err => {
|
||||||
|
this.handleError(err.message, 'err');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
handleChangePermissions(topicName, mode, uid) {
|
handleChangePermissions(topicName, mode, uid) {
|
||||||
const topic = this.tinode.getTopic(topicName);
|
const topic = this.tinode.getTopic(topicName);
|
||||||
|
|
||||||
@@ -6367,7 +6351,8 @@ class TinodeWeb extends (react__WEBPACK_IMPORTED_MODULE_0___default().Component)
|
|||||||
onLoginRequest: this.handleLoginRequest,
|
onLoginRequest: this.handleLoginRequest,
|
||||||
onPersistenceChange: this.handlePersistenceChange,
|
onPersistenceChange: this.handlePersistenceChange,
|
||||||
onCreateAccount: this.handleNewAccountRequest,
|
onCreateAccount: this.handleNewAccountRequest,
|
||||||
onUpdateAccount: this.handleUpdateAccountRequest,
|
onUpdateAccountDesc: this.handleTopicUpdateRequest,
|
||||||
|
onUpdatePassword: this.handleUpdatePasswordRequest,
|
||||||
onUpdateAccountTags: this.handleUpdateAccountTagsRequest,
|
onUpdateAccountTags: this.handleUpdateAccountTagsRequest,
|
||||||
onTogglePushNotifications: this.togglePushToken,
|
onTogglePushNotifications: this.togglePushToken,
|
||||||
onToggleMessageSounds: this.handleToggleMessageSounds,
|
onToggleMessageSounds: this.handleToggleMessageSounds,
|
||||||
@@ -6547,7 +6532,7 @@ class TopicCommonView extends (react__WEBPACK_IMPORTED_MODULE_0___default().Comp
|
|||||||
this.setState({
|
this.setState({
|
||||||
fullName: fn
|
fullName: fn
|
||||||
});
|
});
|
||||||
this.props.onUpdateAccount(undefined, (0,_lib_utils_js__WEBPACK_IMPORTED_MODULE_9__.theCard)(fn, null));
|
this.props.onUpdateTopicDesc(this.props.topic, (0,_lib_utils_js__WEBPACK_IMPORTED_MODULE_9__.theCard)(fn, null));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6558,7 +6543,7 @@ class TopicCommonView extends (react__WEBPACK_IMPORTED_MODULE_0___default().Comp
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (!img) {
|
if (!img) {
|
||||||
this.props.onUpdateAccount(undefined, (0,_lib_utils_js__WEBPACK_IMPORTED_MODULE_9__.theCard)(null, (tinode_sdk__WEBPACK_IMPORTED_MODULE_2___default().DEL_CHAR)));
|
this.props.onUpdateTopicDesc(this.props.topic, (0,_lib_utils_js__WEBPACK_IMPORTED_MODULE_9__.theCard)(null, (tinode_sdk__WEBPACK_IMPORTED_MODULE_2___default().DEL_CHAR)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6583,7 +6568,7 @@ class TopicCommonView extends (react__WEBPACK_IMPORTED_MODULE_0___default().Comp
|
|||||||
uploading: true
|
uploading: true
|
||||||
});
|
});
|
||||||
uploader.upload(blob).then(url => {
|
uploader.upload(blob).then(url => {
|
||||||
this.props.onUpdateAccount(undefined, (0,_lib_utils_js__WEBPACK_IMPORTED_MODULE_9__.theCard)(null, url));
|
this.props.onUpdateTopicDesc(this.props.topic, (0,_lib_utils_js__WEBPACK_IMPORTED_MODULE_9__.theCard)(null, url));
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
this.props.onError(err, 'err');
|
this.props.onError(err, 'err');
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
@@ -6603,7 +6588,7 @@ class TopicCommonView extends (react__WEBPACK_IMPORTED_MODULE_0___default().Comp
|
|||||||
this.setState({
|
this.setState({
|
||||||
source: du
|
source: du
|
||||||
});
|
});
|
||||||
this.props.onUpdateAccount(undefined, (0,_lib_utils_js__WEBPACK_IMPORTED_MODULE_9__.theCard)(null, du));
|
this.props.onUpdateTopicDesc(this.props.topic, (0,_lib_utils_js__WEBPACK_IMPORTED_MODULE_9__.theCard)(null, du));
|
||||||
this.setState({
|
this.setState({
|
||||||
uploading: false
|
uploading: false
|
||||||
});
|
});
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user