From e2921103bd9fd5218ebcf619e67a4e42ea818a22 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Thu, 30 Jan 2020 17:43:57 +1100 Subject: [PATCH] fix lint and clean code --- js/views/conversation_view.js | 7 ++----- ts/components/session/SessionChannelSettings.tsx | 16 ++++++++-------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/js/views/conversation_view.js b/js/views/conversation_view.js index 6d90fd71d..11c59c940 100644 --- a/js/views/conversation_view.js +++ b/js/views/conversation_view.js @@ -350,12 +350,9 @@ props: getGroupSettingsProp(this.model), }); this.$('.conversation-content-right').append(this.groupSettings.el); - this.$('.conversation-content-right').show(); - - return; + } else { + this.groupSettings.update(getGroupSettingsProp(this.model)); } - - this.groupSettings.update(getGroupSettingsProp(this.model)); this.$('.conversation-content-right').show(); }; diff --git a/ts/components/session/SessionChannelSettings.tsx b/ts/components/session/SessionChannelSettings.tsx index f775d84e8..45e65d29a 100644 --- a/ts/components/session/SessionChannelSettings.tsx +++ b/ts/components/session/SessionChannelSettings.tsx @@ -51,14 +51,14 @@ export class SessionChannelSettings extends React.Component { public componentDidUpdate() { this.getMediaGalleryProps() - .then(({ documents, media, onItemClick }) => { - this.setState({ - documents, - media, - onItemClick, - }); - }) - .ignore(); + .then(({ documents, media, onItemClick }) => { + this.setState({ + documents, + media, + onItemClick, + }); + }) + .ignore(); } public async getMediaGalleryProps() {