diff --git a/desktop/app/src/reducers/notifications.tsx b/desktop/app/src/reducers/notifications.tsx index 60aa580bc..21f0ff4ed 100644 --- a/desktop/app/src/reducers/notifications.tsx +++ b/desktop/app/src/reducers/notifications.tsx @@ -12,6 +12,8 @@ import {Actions} from './'; import {getStringFromErrorLike} from '../utils'; import React from 'react'; +export const GLOBAL_NOTIFICATION_PLUGIN_ID = 'Flipper'; + export type PluginNotification = { notification: Notification; pluginId: string; @@ -208,7 +210,7 @@ export function addErrorNotification( console.warn(title, message, error); return addNotification({ client: null, - pluginId: 'globalError', + pluginId: GLOBAL_NOTIFICATION_PLUGIN_ID, notification: { id: title, title, diff --git a/desktop/app/src/sandy-chrome/notification/Notification.tsx b/desktop/app/src/sandy-chrome/notification/Notification.tsx index 9cbe10444..093eda4ab 100644 --- a/desktop/app/src/sandy-chrome/notification/Notification.tsx +++ b/desktop/app/src/sandy-chrome/notification/Notification.tsx @@ -24,6 +24,7 @@ import {useDispatch, useStore} from '../../utils/useStore'; import {selectPlugin} from '../../reducers/connections'; import { clearAllNotifications, + GLOBAL_NOTIFICATION_PLUGIN_ID, PluginNotification as PluginNotificationOrig, updateCategoryBlocklist, updatePluginBlocklist, @@ -39,7 +40,7 @@ type NotificationExtra = { onHidePlugin: () => void; clientName: string | undefined; appName: string | undefined; - pluginName: string; + pluginName: string | null | undefined; iconName: string | null | undefined; }; type PluginNotification = NotificationData & NotificationExtra; @@ -152,17 +153,21 @@ function NotificationEntry({notification}: {notification: PluginNotification}) { {actions} - + <Title level={4} ellipsis={{rows: 3}}> {title} - - {clientName && appName - ? `${clientName}/${appName}` - : clientName ?? appName ?? 'Not Connected'} - - + {pluginName !== GLOBAL_NOTIFICATION_PLUGIN_ID && ( + <> + + {clientName && appName + ? `${clientName}/${appName}` + : clientName ?? appName ?? 'Not Connected'} + + + + )} );