edit-account: fixes bug with updating a photo

This commit is contained in:
@wwwjim 2020-09-02 17:58:56 -07:00
parent ba48cfba21
commit 7ee6f46593

View File

@ -66,6 +66,7 @@ export default class SceneEditAccount extends React.Component {
} }
const cid = json.data.ipfs.replace("/ipfs/", ""); const cid = json.data.ipfs.replace("/ipfs/", "");
const url = Strings.getCIDGatewayURL(cid);
await Actions.updateViewer({ await Actions.updateViewer({
data: { data: {
photo: Strings.getCIDGatewayURL(cid), photo: Strings.getCIDGatewayURL(cid),
@ -76,7 +77,7 @@ export default class SceneEditAccount extends React.Component {
await this.props.onRehydrate(); await this.props.onRehydrate();
this.setState({ changingAvatar: false }); this.setState({ changingAvatar: false, photo: url });
}; };
_handleSaveBio = async (e) => { _handleSaveBio = async (e) => {