mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-18 07:36:00 +01:00
Fix megaphone check for dontShowBeforeEpochMs
This commit is contained in:
@@ -194,6 +194,7 @@ export function isMegaphoneShowable(
|
||||
): megaphone is VisibleRemoteMegaphoneType {
|
||||
const nowMs = Date.now();
|
||||
const {
|
||||
dontShowBeforeEpochMs,
|
||||
dontShowAfterEpochMs,
|
||||
isFinished,
|
||||
snoozedAt,
|
||||
@@ -201,7 +202,11 @@ export function isMegaphoneShowable(
|
||||
secondaryCtaId,
|
||||
} = megaphone;
|
||||
|
||||
if (isFinished || nowMs > dontShowAfterEpochMs) {
|
||||
if (
|
||||
isFinished ||
|
||||
nowMs < dontShowBeforeEpochMs ||
|
||||
nowMs > dontShowAfterEpochMs
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user