2023-11-03 15:00:03 +00:00
|
|
|
import { createAction } from '@reduxjs/toolkit';
|
|
|
|
|
2024-07-18 14:36:09 +00:00
|
|
|
import type { ApiNotificationJSON } from 'mastodon/api_types/notifications';
|
2023-11-03 15:00:03 +00:00
|
|
|
|
|
|
|
export const notificationsUpdate = createAction(
|
|
|
|
'notifications/update',
|
|
|
|
({
|
|
|
|
playSound,
|
|
|
|
...args
|
|
|
|
}: {
|
2024-07-18 14:36:09 +00:00
|
|
|
notification: ApiNotificationJSON;
|
2023-11-03 15:00:03 +00:00
|
|
|
usePendingItems: boolean;
|
|
|
|
playSound: boolean;
|
|
|
|
}) => ({
|
|
|
|
payload: args,
|
2023-12-11 14:23:30 +00:00
|
|
|
meta: { sound: playSound ? 'boop' : undefined },
|
2023-11-03 15:00:03 +00:00
|
|
|
}),
|
|
|
|
);
|