Restart button added to plugin update notifications

Summary:
Simple implementation of restart button on auto-update notifications. Should make the flow a bit more convenient.

Changelog: Added button "Restart Flipper" to plugin auto-update notifications.

Reviewed By: passy

Differential Revision: D22528729

fbshipit-source-id: 6da6b858baed1e0f3cae57f1a614907b61899d10
This commit is contained in:
Anton Nikolaev
2020-07-15 02:51:26 -07:00
committed by Facebook GitHub Bot
parent 6fe477f19b
commit 3e87715a8f

View File

@@ -146,7 +146,15 @@ export default (store: Store, logger: Logger) => {
blacklistedCategories, blacklistedCategories,
} = notifications; } = notifications;
activeNotifications.forEach((n: PluginNotification) => { activeNotifications
.map((n) => ({
...n,
notification: {
...n.notification,
message: textContent(n.notification.message),
},
}))
.forEach((n: PluginNotification) => {
if ( if (
!isHeadless() && !isHeadless() &&
store.getState().connections.selectedPlugin !== 'notifications' && store.getState().connections.selectedPlugin !== 'notifications' &&
@@ -172,7 +180,7 @@ export default (store: Store, logger: Logger) => {
ipcRenderer.send('sendNotification', { ipcRenderer.send('sendNotification', {
payload: { payload: {
title: n.notification.title, title: n.notification.title,
body: textContent(n.notification.message), body: n.notification.message,
actions: [ actions: [
{ {
type: 'button', type: 'button',