Make default audio tone more prominent
Label Note as (default) Move it to the second item in the list, just after "None" // FREEBIE
This commit is contained in:
parent
dafde88f8b
commit
46d944740b
@ -74,13 +74,25 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
for (NSNumber *nsValue in allSounds) {
|
||||
OWSSound sound = (OWSSound)nsValue.intValue;
|
||||
OWSTableItem *item;
|
||||
|
||||
NSString *soundLabelText = ^{
|
||||
NSString *baseName = [OWSSounds displayNameForSound:sound];
|
||||
if (sound == OWSSound_Note) {
|
||||
NSString *noteStringFormat = NSLocalizedString(@"SETTINGS_AUDIO_DEFAULT_TONE_LABEL_FORMAT",
|
||||
@"Format string for the default 'Note' sound. Embeds the system {{sound name}}.");
|
||||
return [NSString stringWithFormat:noteStringFormat, baseName];
|
||||
} else {
|
||||
return [OWSSounds displayNameForSound:sound];
|
||||
}
|
||||
}();
|
||||
|
||||
if (sound == self.currentSound) {
|
||||
item = [OWSTableItem checkmarkItemWithText:[OWSSounds displayNameForSound:sound]
|
||||
item = [OWSTableItem checkmarkItemWithText:soundLabelText
|
||||
actionBlock:^{
|
||||
[weakSelf soundWasSelected:sound];
|
||||
}];
|
||||
} else {
|
||||
item = [OWSTableItem actionItemWithText:[OWSSounds displayNameForSound:sound]
|
||||
item = [OWSTableItem actionItemWithText:soundLabelText
|
||||
actionBlock:^{
|
||||
[weakSelf soundWasSelected:sound];
|
||||
}];
|
||||
|
||||
@ -1512,6 +1512,9 @@
|
||||
/* No comment provided by engineer. */
|
||||
"SETTINGS_ADVANCED_TITLE" = "Advanced";
|
||||
|
||||
/* Format string for the default 'Note' sound. Embeds the system {{sound name}}. */
|
||||
"SETTINGS_AUDIO_DEFAULT_TONE_LABEL_FORMAT" = "%@ (default)";
|
||||
|
||||
/* A label for the 'add phone number' button in the block list table. */
|
||||
"SETTINGS_BLOCK_LIST_ADD_BUTTON" = "Add…";
|
||||
|
||||
|
||||
@ -62,8 +62,9 @@ NSString *const kOWSSoundsStorageGlobalNotificationKey = @"kOWSSoundsStorageGlob
|
||||
+ (NSArray<NSNumber *> *)allNotificationSounds
|
||||
{
|
||||
return @[
|
||||
// None should be first.
|
||||
// None and Note (default) should be first.
|
||||
@(OWSSound_None),
|
||||
@(OWSSound_Note),
|
||||
|
||||
@(OWSSound_Aurora),
|
||||
@(OWSSound_Bamboo),
|
||||
@ -74,7 +75,6 @@ NSString *const kOWSSoundsStorageGlobalNotificationKey = @"kOWSSoundsStorageGlob
|
||||
@(OWSSound_Hello),
|
||||
@(OWSSound_Input),
|
||||
@(OWSSound_Keys),
|
||||
@(OWSSound_Note),
|
||||
@(OWSSound_Popcorn),
|
||||
@(OWSSound_Pulse),
|
||||
@(OWSSound_Synth),
|
||||
@ -89,7 +89,7 @@ NSString *const kOWSSoundsStorageGlobalNotificationKey = @"kOWSSoundsStorageGlob
|
||||
OWSFail(@"%@ invalid argument.", self.logTag);
|
||||
return @"";
|
||||
|
||||
// Notification Sounds
|
||||
// Notification Sounds
|
||||
case OWSSound_Aurora:
|
||||
return @"Aurora";
|
||||
case OWSSound_Bamboo:
|
||||
@ -117,11 +117,9 @@ NSString *const kOWSSoundsStorageGlobalNotificationKey = @"kOWSSoundsStorageGlob
|
||||
case OWSSound_ClassicNotification:
|
||||
return @"Classic";
|
||||
|
||||
// Ringtone Sounds
|
||||
// Call Audio
|
||||
case OWSSound_Opening:
|
||||
return @"Opening";
|
||||
|
||||
// Calls
|
||||
case OWSSound_CallConnecting:
|
||||
return @"Call Connecting";
|
||||
case OWSSound_CallOutboundRinging:
|
||||
@ -131,7 +129,7 @@ NSString *const kOWSSoundsStorageGlobalNotificationKey = @"kOWSSoundsStorageGlob
|
||||
case OWSSound_CallFailure:
|
||||
return @"Call Failure";
|
||||
|
||||
// Other
|
||||
// Other
|
||||
case OWSSound_None:
|
||||
return NSLocalizedString(@"SOUNDS_NONE",
|
||||
@"Label for the 'no sound' option that allows users to disable sounds for notifications, "
|
||||
@ -286,6 +284,7 @@ NSString *const kOWSSoundsStorageGlobalNotificationKey = @"kOWSSoundsStorageGlob
|
||||
{
|
||||
OWSAssert(transaction);
|
||||
|
||||
DDLogInfo(@"%@ Setting global notification sound to: %s", sound);
|
||||
[transaction setObject:@(sound)
|
||||
forKey:kOWSSoundsStorageGlobalNotificationKey
|
||||
inCollection:kOWSSoundsStorageNotificationCollection];
|
||||
|
||||
@ -65,10 +65,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
NSMutableArray<OWSDatabaseMigration *> *migrationsToRun = [NSMutableArray new];
|
||||
for (OWSDatabaseMigration *migration in migrations) {
|
||||
if ([OWSDatabaseMigration fetchObjectWithUniqueID:migration.uniqueId]) {
|
||||
DDLogDebug(@"%@ Skipping previously run migration: %@", self.logTag, migration);
|
||||
} else {
|
||||
DDLogWarn(@"%@ Running migration: %@", self.logTag, migration);
|
||||
if ([OWSDatabaseMigration fetchObjectWithUniqueID:migration.uniqueId] == nil) {
|
||||
[migrationsToRun addObject:migration];
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user