Try to fix streaming notifications issue
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
cea02b161c
commit
dd1fe0917b
4 changed files with 2 additions and 13 deletions
|
@ -5,7 +5,7 @@ import { defineMessages } from 'react-intl';
|
||||||
|
|
||||||
import { getClient } from 'soapbox/api';
|
import { getClient } from 'soapbox/api';
|
||||||
import { getNotificationStatus } from 'soapbox/features/notifications/components/notification';
|
import { getNotificationStatus } from 'soapbox/features/notifications/components/notification';
|
||||||
import { normalizeNotifications, type Notification } from 'soapbox/normalizers';
|
import { normalizeNotification, normalizeNotifications, type Notification } from 'soapbox/normalizers';
|
||||||
import { getFilters, regexFromFilters } from 'soapbox/selectors';
|
import { getFilters, regexFromFilters } from 'soapbox/selectors';
|
||||||
import { isLoggedIn } from 'soapbox/utils/auth';
|
import { isLoggedIn } from 'soapbox/utils/auth';
|
||||||
import { compareId } from 'soapbox/utils/comparators';
|
import { compareId } from 'soapbox/utils/comparators';
|
||||||
|
@ -92,7 +92,7 @@ const updateNotifications = (notification: BaseNotification) =>
|
||||||
if (showInColumn) {
|
if (showInColumn) {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: NOTIFICATIONS_UPDATE,
|
type: NOTIFICATIONS_UPDATE,
|
||||||
notification,
|
notification: normalizeNotification(notification),
|
||||||
});
|
});
|
||||||
|
|
||||||
fetchRelatedRelationships(dispatch, [notification]);
|
fetchRelatedRelationships(dispatch, [notification]);
|
||||||
|
|
|
@ -25,9 +25,6 @@ import SensitiveContentOverlay from './statuses/sensitive-content-overlay';
|
||||||
import StatusInfo from './statuses/status-info';
|
import StatusInfo from './statuses/status-info';
|
||||||
import { Card, Icon, Stack, Text } from './ui';
|
import { Card, Icon, Stack, Text } from './ui';
|
||||||
|
|
||||||
// Defined in components/scrollable-list
|
|
||||||
type ScrollPosition = { height: number; top: number };
|
|
||||||
|
|
||||||
const messages = defineMessages({
|
const messages = defineMessages({
|
||||||
reblogged_by: { id: 'status.reblogged_by', defaultMessage: '{name} reposted' },
|
reblogged_by: { id: 'status.reblogged_by', defaultMessage: '{name} reposted' },
|
||||||
});
|
});
|
||||||
|
@ -458,7 +455,6 @@ const Status: React.FC<IStatus> = (props) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
export {
|
export {
|
||||||
type ScrollPosition,
|
|
||||||
type IStatus,
|
type IStatus,
|
||||||
Status as default,
|
Status as default,
|
||||||
};
|
};
|
||||||
|
|
|
@ -9,10 +9,6 @@ interface IStatusContainer extends Omit<IStatus, 'status'> {
|
||||||
contextType?: string;
|
contextType?: string;
|
||||||
/** @deprecated Unused. */
|
/** @deprecated Unused. */
|
||||||
otherAccounts?: any;
|
otherAccounts?: any;
|
||||||
/** @deprecated Unused. */
|
|
||||||
getScrollPosition?: any;
|
|
||||||
/** @deprecated Unused. */
|
|
||||||
updateScrollBottom?: any;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -18,7 +18,6 @@ import { makeGetNotification } from 'soapbox/selectors';
|
||||||
import { NotificationType } from 'soapbox/utils/notification';
|
import { NotificationType } from 'soapbox/utils/notification';
|
||||||
|
|
||||||
import type { Notification as BaseNotification } from 'pl-api';
|
import type { Notification as BaseNotification } from 'pl-api';
|
||||||
import type { ScrollPosition } from 'soapbox/components/status';
|
|
||||||
import type { Account, Notification as NotificationEntity, Status as StatusEntity } from 'soapbox/normalizers';
|
import type { Account, Notification as NotificationEntity, Status as StatusEntity } from 'soapbox/normalizers';
|
||||||
import type { MinifiedNotification } from 'soapbox/reducers/notifications';
|
import type { MinifiedNotification } from 'soapbox/reducers/notifications';
|
||||||
|
|
||||||
|
@ -174,8 +173,6 @@ interface INotification {
|
||||||
onMoveUp?: (notificationId: string) => void;
|
onMoveUp?: (notificationId: string) => void;
|
||||||
onMoveDown?: (notificationId: string) => void;
|
onMoveDown?: (notificationId: string) => void;
|
||||||
onReblog?: (status: StatusEntity, e?: KeyboardEvent) => void;
|
onReblog?: (status: StatusEntity, e?: KeyboardEvent) => void;
|
||||||
getScrollPosition?: () => ScrollPosition | undefined;
|
|
||||||
updateScrollBottom?: (bottom: number) => void;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const getNotificationStatus = (n: NotificationEntity | BaseNotification) => {
|
const getNotificationStatus = (n: NotificationEntity | BaseNotification) => {
|
||||||
|
|
Loading…
Reference in a new issue