From 225f536cd10052be7571bedbab9ddeea5ffa9f0a Mon Sep 17 00:00:00 2001 From: Thomas Nordquist Date: Sun, 13 Jan 2019 21:08:55 +0100 Subject: [PATCH] Tweak update notification settings --- app/src/UpdateNotifier.tsx | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/app/src/UpdateNotifier.tsx b/app/src/UpdateNotifier.tsx index 94b1d59..77aa0c0 100644 --- a/app/src/UpdateNotifier.tsx +++ b/app/src/UpdateNotifier.tsx @@ -51,12 +51,19 @@ class UpdateNotifier extends React.Component { this.props.actions.showUpdateNotification(true) } + private onCloseNotification = (event: React.SyntheticEvent, reason: string) => { + if (reason === 'clickaway') { + return + } + this.props.actions.showUpdateNotification(false) + } + private closeNotification = () => { this.props.actions.showUpdateNotification(false) } private showDetails = () => { - this.closeNotification() + this.props.actions.showUpdateNotification(false) this.props.actions.showUpdateDetails(true) } @@ -74,7 +81,7 @@ class UpdateNotifier extends React.Component { } private renderUpdateNotification() { - const snackbarAnchor = { + const snackbarAnchor: any = { vertical: 'top', horizontal: 'right', } @@ -83,8 +90,8 @@ class UpdateNotifier extends React.Component {