From 8e0a4a5e424b034fb04c14bfa423f11f4bc4072f Mon Sep 17 00:00:00 2001 From: John Knox Date: Fri, 6 Dec 2019 07:25:55 -0800 Subject: [PATCH] Fix clicking on native notification Reviewed By: passy Differential Revision: D18831700 fbshipit-source-id: 4cdaed3893fc6162a16ac2c1a8a9ee2ef1a0805c --- src/dispatcher/notifications.tsx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/dispatcher/notifications.tsx b/src/dispatcher/notifications.tsx index df9f65f14..464acbc35 100644 --- a/src/dispatcher/notifications.tsx +++ b/src/dispatcher/notifications.tsx @@ -13,7 +13,7 @@ import {PluginNotification} from '../reducers/notifications'; import {FlipperPlugin, FlipperDevicePlugin} from '../plugin'; import isHeadless from '../utils/isHeadless'; import {ipcRenderer} from 'electron'; -import {selectPlugin} from '../reducers/connections'; +import {setStaticView} from '../reducers/connections'; import { setActiveNotifications, updatePluginBlacklist, @@ -22,6 +22,7 @@ import { import {textContent} from '../utils/index'; import GK from '../fb-stubs/GK'; import {deconstructPluginKey} from '../utils/clientUtils'; +import NotificationScreen from '../chrome/NotificationScreen'; type NotificationEvents = 'show' | 'click' | 'close' | 'reply' | 'action'; const NOTIFICATION_THROTTLE = 5 * 1000; // in milliseconds @@ -44,13 +45,7 @@ export default (store: Store, logger: Logger) => { arg: null | string | number, ) => { if (eventName === 'click' || (eventName === 'action' && arg === 0)) { - store.dispatch( - selectPlugin({ - selectedPlugin: 'notifications', - selectedApp: null, - deepLinkPayload: pluginNotification.notification.id, - }), - ); + store.dispatch(setStaticView(NotificationScreen)); } else if (eventName === 'action') { if (arg === 1 && pluginNotification.notification.category) { // Hide similar (category)