From 761ebf4a7c3db1e60024cd9b693def914f5aedd5 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Thu, 30 Jul 2020 15:03:08 +1000 Subject: [PATCH] lint --- js/views/inbox_view.js | 9 ++++- ts/components/session/ActionsPanel.tsx | 43 ++++++++++++---------- ts/components/session/RegistrationTabs.tsx | 2 +- ts/components/session/SessionConfirm.tsx | 6 ++- 4 files changed, 37 insertions(+), 23 deletions(-) diff --git a/js/views/inbox_view.js b/js/views/inbox_view.js index 31a6bf75b..9d702b620 100644 --- a/js/views/inbox_view.js +++ b/js/views/inbox_view.js @@ -90,7 +90,14 @@ type: 'success', }); }, - showConfirmationDialog({ title, message, messageSub, onOk, onCancel, hideCancel }) { + showConfirmationDialog({ + title, + message, + messageSub, + onOk, + onCancel, + hideCancel, + }) { window.confirmationDialog({ title, message, diff --git a/ts/components/session/ActionsPanel.tsx b/ts/components/session/ActionsPanel.tsx index c53b2b7af..29b299fc7 100644 --- a/ts/components/session/ActionsPanel.tsx +++ b/ts/components/session/ActionsPanel.tsx @@ -57,26 +57,29 @@ export class ActionsPanel extends React.Component { }, 'refreshAvatarCallback' ); - setTimeout( - async () => { - const hasMultipleDevices = (await MultiDeviceProtocol.getOurDevices()).length > 1; - const primaryWithSecondary = !window.textsecure.storage.get('isSecondaryDevice') && hasMultipleDevices; - const isSecondary = !!window.textsecure.storage.get('isSecondaryDevice'); - - if (!primaryWithSecondary && !isSecondary) { - return; - } - - const opts = { - hideCancel: true, - title: window.i18n('multiDeviceDisabledTemporaryTitle'), - message: primaryWithSecondary ? window.i18n('multiDeviceDisabledTemporaryDescriptionPrimary') : window.i18n('multiDeviceDisabledTemporaryDescriptionSecondary') - , - }; - window.Whisper.events.trigger('showConfirmationDialog', opts); - }, - 1000 - ); + setTimeout(async () => { + const hasMultipleDevices = + (await MultiDeviceProtocol.getOurDevices()).length > 1; + const primaryWithSecondary = + !window.textsecure.storage.get('isSecondaryDevice') && + hasMultipleDevices; + const isSecondary = !!window.textsecure.storage.get( + 'isSecondaryDevice' + ); + + if (!primaryWithSecondary && !isSecondary) { + return; + } + + const opts = { + hideCancel: true, + title: window.i18n('multiDeviceDisabledTemporaryTitle'), + message: primaryWithSecondary + ? window.i18n('multiDeviceDisabledTemporaryDescriptionPrimary') + : window.i18n('multiDeviceDisabledTemporaryDescriptionSecondary'), + }; + window.Whisper.events.trigger('showConfirmationDialog', opts); + }, 1000); } ); } diff --git a/ts/components/session/RegistrationTabs.tsx b/ts/components/session/RegistrationTabs.tsx index 6d610e8b6..4690a3d34 100644 --- a/ts/components/session/RegistrationTabs.tsx +++ b/ts/components/session/RegistrationTabs.tsx @@ -584,7 +584,7 @@ export class RegistrationTabs extends React.Component<{}, State> { return (
{this.renderContinueYourSessionButton()} - {/*

{or}

*/} + {/*

{or}

*/} {/* FIXME enable back to allow linking of device this.renderLinkDeviceToExistingAccountButton()*/}
diff --git a/ts/components/session/SessionConfirm.tsx b/ts/components/session/SessionConfirm.tsx index 47ea5273f..ed8914c4a 100644 --- a/ts/components/session/SessionConfirm.tsx +++ b/ts/components/session/SessionConfirm.tsx @@ -62,7 +62,11 @@ export class SessionConfirm extends React.Component { {!showHeader &&
}
- + {messageSub && ( {messageSub}