diff --git a/images/cta/donate-appeal.webp b/images/cta/donate-appeal.webp index 697f23d6f7..27842a2262 100644 Binary files a/images/cta/donate-appeal.webp and b/images/cta/donate-appeal.webp differ diff --git a/package.json b/package.json index d66c1e3bbb..5e6de7e4d1 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "name": "session-desktop", "productName": "Session", "description": "Private messaging from your desktop", - "version": "1.18.0", + "version": "1.18.1", "license": "GPL-3.0", "author": { "name": "Session Foundation", diff --git a/ts/components/dialog/SessionCTA.tsx b/ts/components/dialog/SessionCTA.tsx index 1c82dc8d80..56d7e86616 100644 --- a/ts/components/dialog/SessionCTA.tsx +++ b/ts/components/dialog/SessionCTA.tsx @@ -194,7 +194,7 @@ const StyledDonateAppealTitleContainer = styled(Localizer)` `; function DonateAppealTitle() { - return ; + return ; } function getTitle(variant: CTAVariantExcludingProCTAs) { @@ -226,7 +226,7 @@ function getDescription(variant: CTAVariantExcludingProCTAs) { return ; case CTAVariant.DONATE_APPEAL: - return ; + return ; default: assertUnreachable(variant, 'CtaTitle'); diff --git a/ts/localization b/ts/localization index ceffc44603..f824751eba 160000 --- a/ts/localization +++ b/ts/localization @@ -1 +1 @@ -Subproject commit ceffc446039c90ea1b85b9d6c83df9f282113045 +Subproject commit f824751eba28e98843e082c08672393224e6b939 diff --git a/ts/node/migration/sessionMigrations.ts b/ts/node/migration/sessionMigrations.ts index fe5885775a..5f5c29a5f2 100644 --- a/ts/node/migration/sessionMigrations.ts +++ b/ts/node/migration/sessionMigrations.ts @@ -131,6 +131,7 @@ const LOKI_SCHEMA_VERSIONS: Array<(currentVersion: number, db: Database) => void updateToSessionSchemaVersion53, updateToSessionSchemaVersion54, updateToSessionSchemaVersion55, + updateToSessionSchemaVersion56, ]; function updateToSessionSchemaVersion1(currentVersion: number, db: Database) { @@ -2398,30 +2399,26 @@ async function updateToSessionSchemaVersion54(currentVersion: number, db: Databa console.log(`updateToSessionSchemaVersion${targetVersion}: success!`); } -async function updateToSessionSchemaVersion55(currentVersion: number, db: Database) { - const targetVersion = 55; - if (currentVersion >= targetVersion) { - return; - } +async function removeDonateAppealCTAReadFlag(targetVersion: number, db: Database) { console.log(`updateToSessionSchemaVersion${targetVersion}: starting...`); db.transaction(() => { const ctaInteractions = sqlNode.getItemById(SettingsKey.ctaInteractions, db)?.value ?? []; console.log( - `updateToSessionSchemaVersion55 ${SettingsKey.ctaInteractions} before: ${JSON.stringify(ctaInteractions)}` + `updateToSessionSchemaVersion${targetVersion} ${SettingsKey.ctaInteractions} before: ${JSON.stringify(ctaInteractions)}` ); const idx = ctaInteractions.findIndex((i: any) => i?.variant === CTAVariant.DONATE_APPEAL); if (idx !== -1) { ctaInteractions.splice(idx, 1); console.log( - `updateToSessionSchemaVersion55 removed ${CTAVariant.DONATE_APPEAL} from ${SettingsKey.ctaInteractions}` + `updateToSessionSchemaVersion${targetVersion} removed ${CTAVariant.DONATE_APPEAL} from ${SettingsKey.ctaInteractions}` ); sqlNode.createOrUpdateItem({ id: SettingsKey.ctaInteractions, value: ctaInteractions }, db); } console.log( - `updateToSessionSchemaVersion55 ${SettingsKey.ctaInteractions} after: ${JSON.stringify(sqlNode.getItemById(SettingsKey.ctaInteractions, db)?.value ?? [])}` + `updateToSessionSchemaVersion${targetVersion} ${SettingsKey.ctaInteractions} after: ${JSON.stringify(sqlNode.getItemById(SettingsKey.ctaInteractions, db)?.value ?? [])}` ); writeSessionSchemaVersion(targetVersion, db); @@ -2430,6 +2427,24 @@ async function updateToSessionSchemaVersion55(currentVersion: number, db: Databa console.log(`updateToSessionSchemaVersion${targetVersion}: success!`); } +async function updateToSessionSchemaVersion55(currentVersion: number, db: Database) { + const targetVersion = 55; + if (currentVersion >= targetVersion) { + return; + } + await removeDonateAppealCTAReadFlag(targetVersion, db); +} + +// Note: updateToSessionSchemaVersion55 and updateToSessionSchemaVersion56 are the same, +// but run at different times to make the donate appeal CTA show up again. +async function updateToSessionSchemaVersion56(currentVersion: number, db: Database) { + const targetVersion = 56; + if (currentVersion >= targetVersion) { + return; + } + await removeDonateAppealCTAReadFlag(targetVersion, db); +} + export function printTableColumns(table: string, db: Database) { console.info(db.pragma(`table_info('${table}');`)); }