fix: minor supported versions details (#5296)
This commit is contained in:
parent
13af95f8cb
commit
36ca0384b7
|
@ -16,7 +16,7 @@ export const getMessage = ({
|
|||
return;
|
||||
}
|
||||
const sortedMessages = messages.sort((a, b) => a.remainingDays - b.remainingDays);
|
||||
return sortedMessages.find(({ remainingDays }) => moment(expiration).diff(new Date(), 'days') <= remainingDays);
|
||||
return sortedMessages.find(({ remainingDays }) => moment(expiration).diff(new Date(), 'hours') <= remainingDays * 24);
|
||||
};
|
||||
|
||||
const getStatus = ({ expiration, message }: { expiration?: string; message?: TSVMessage }): TSVStatus => {
|
||||
|
|
|
@ -73,6 +73,7 @@ class Sidebar extends Component<ISidebarProps, ISidebarState> {
|
|||
useRealName,
|
||||
theme,
|
||||
Presence_broadcast_disabled,
|
||||
supportedVersionsStatus,
|
||||
viewStatisticsPermission,
|
||||
viewRoomAdministrationPermission,
|
||||
viewUserAdministrationPermission,
|
||||
|
@ -112,6 +113,9 @@ class Sidebar extends Component<ISidebarProps, ISidebarState> {
|
|||
if (nextProps.Presence_broadcast_disabled !== Presence_broadcast_disabled) {
|
||||
return true;
|
||||
}
|
||||
if (nextProps.supportedVersionsStatus !== supportedVersionsStatus) {
|
||||
return true;
|
||||
}
|
||||
if (!dequal(nextProps.viewStatisticsPermission, viewStatisticsPermission)) {
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue