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