WhatsNew: Save build creation time, use as displayed date

This commit is contained in:
Scott Nonnenberg 2021-09-13 12:00:32 -07:00 committed by GitHub
parent 240585ef94
commit 29a3a2ac58
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 9 additions and 3 deletions

View file

@ -26,7 +26,7 @@ export const WhatsNew = ({ i18n }: PropsType): JSX.Element => {
const viewReleaseNotes = () => {
setReleaseNotes({
date: new Date('09/02/2021'),
date: new Date(window.getBuildCreation?.() || Date.now()),
version: window.getVersion(),
features: ['WhatsNew__v5.17--1', 'WhatsNew__v5.17--2'],
});

1
ts/window.d.ts vendored
View file

@ -199,6 +199,7 @@ declare global {
getAccountManager: () => AccountManager;
getBuiltInImages: () => Promise<Array<string>>;
getConversations: () => ConversationModelCollectionType;
getBuildCreation: () => number;
getEnvironment: typeof getEnvironment;
getExpiration: () => string;
getGuid: () => string;