Skip to content

Commit 110c6de

Browse files
committed
[sendDisplayNotification] - changed the name of the ui-command
1 parent e5573af commit 110c6de

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

samples/sample-action-button-dropdown-plugin/src/components/sample-action-button-dropdown-plugin-item/component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ function SampleActionButtonDropdownPlugin(
149149
tooltip: 'this is a button injected by plugin',
150150
allowed: true,
151151
onClick: () => {
152-
pluginApi.uiCommands.notification.setDisplayNotifications(false);
152+
pluginApi.uiCommands.notification.setEnabledDisplayNotifications(false);
153153
},
154154
}),
155155
new ActionButtonDropdownOption({

src/ui-commands/notification/commands.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { NotificationEnum } from './enums';
2-
import { SendNotificationCommandArguments, SetDisplayNotificationsArguments } from './types';
2+
import { SendNotificationCommandArguments, SetEnableDisplayNotificationsArguments } from './types';
33

44
export const notification = {
55
/**
@@ -17,12 +17,12 @@ export const notification = {
1717
/**
1818
* Decides if notifications stop being displayed.
1919
*/
20-
setDisplayNotifications: (isNotificationDisplaying: boolean) => {
20+
setEnabledDisplayNotifications: (isNotificationDisplayEnabled: boolean) => {
2121
window.dispatchEvent(
2222
new CustomEvent<
23-
SetDisplayNotificationsArguments
24-
>(NotificationEnum.SET_DISPLAY, {
25-
detail: { isNotificationDisplaying },
23+
SetEnableDisplayNotificationsArguments
24+
>(NotificationEnum.SET_ENABLED_DISPLAY, {
25+
detail: { isNotificationDisplayEnabled },
2626
}),
2727
);
2828
},

src/ui-commands/notification/enums.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export enum NotificationEnum {
2-
SEND = 'SEND_NOTIFICATION',
3-
SET_DISPLAY = 'SET_DISPLAY'
2+
SEND = 'SEND_NOTIFICATION_COMMAND',
3+
SET_ENABLED_DISPLAY = 'SET_ENABLED_DISPLAY_COMMAND'
44
}
55

66
export enum NotificationTypeUiCommand {

src/ui-commands/notification/types.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ export interface SendNotificationCommandArguments {
1515
small?: boolean;
1616
}
1717

18-
export interface SetDisplayNotificationsArguments {
19-
isNotificationDisplaying: boolean;
18+
export interface SetEnableDisplayNotificationsArguments {
19+
isNotificationDisplayEnabled: boolean;
2020
}
2121

2222
export interface UiCommandsNotificationObject {
2323
send: (information: SendNotificationCommandArguments) => void;
24-
setDisplayNotifications: (isNotificationDisplaying: boolean) => void;
24+
setEnabledDisplayNotifications: (isNotificationDisplayEnabled: boolean) => void;
2525
}

0 commit comments

Comments
 (0)