enable sounds by default for existing clients

This commit is contained in:
woodser 2024-10-10 09:13:00 -04:00 committed by GitHub
parent a4223a6aab
commit 264741152a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 0 deletions

View File

@ -314,6 +314,12 @@ public final class Preferences implements PersistedDataHost, BridgeAddressProvid
});
}
// enable sounds by default for existing clients (protobuf does not express that new field is unset)
if (!prefPayload.isUseSoundForNotificationsInitialized()) {
prefPayload.setUseSoundForNotificationsInitialized(true);
setUseSoundForNotifications(true);
}
initialReadDone = true;
requestPersistence();
}

View File

@ -109,6 +109,7 @@ public final class PreferencesPayload implements PersistableEnvelope {
private boolean usePriceNotifications = true;
private boolean useStandbyMode = false;
private boolean useSoundForNotifications = true;
private boolean useSoundForNotificationsInitialized = false;
@Nullable
private String rpcUser;
@Nullable
@ -187,6 +188,7 @@ public final class PreferencesPayload implements PersistableEnvelope {
.setUsePriceNotifications(usePriceNotifications)
.setUseStandbyMode(useStandbyMode)
.setUseSoundForNotifications(useSoundForNotifications)
.setUseSoundForNotificationsInitialized(useSoundForNotificationsInitialized)
.setBuyerSecurityDepositAsPercent(buyerSecurityDepositAsPercent)
.setIgnoreDustThreshold(ignoreDustThreshold)
.setClearDataAfterDays(clearDataAfterDays)
@ -283,6 +285,7 @@ public final class PreferencesPayload implements PersistableEnvelope {
proto.getUsePriceNotifications(),
proto.getUseStandbyMode(),
proto.getUseSoundForNotifications(),
proto.getUseSoundForNotificationsInitialized(),
proto.getRpcUser().isEmpty() ? null : proto.getRpcUser(),
proto.getRpcPw().isEmpty() ? null : proto.getRpcPw(),
proto.getTakeOfferSelectedPaymentAccountId().isEmpty() ? null : proto.getTakeOfferSelectedPaymentAccountId(),

View File

@ -1741,6 +1741,7 @@ message PreferencesPayload {
string sell_screen_crypto_currency_code = 61;
bool split_offer_output = 62;
bool use_sound_for_notifications = 63;
bool use_sound_for_notifications_initialized = 64;
}
message AutoConfirmSettings {