Fix setting global notification sound to 'None'.

Fixes #8206
This commit is contained in:
Greyson Parrelli 2018-09-16 22:29:55 -07:00
parent 9dd3e50ebd
commit 5d11e321a8

View File

@ -137,8 +137,9 @@ public class NotificationsPreferenceFragment extends ListSummaryPreferenceFragme
NotificationChannels.updateMessageRingtone(getContext(), uri);
TextSecurePreferences.removeNotificationRingtone(getContext());
} else {
NotificationChannels.updateMessageRingtone(getContext(), uri);
TextSecurePreferences.setNotificationRingtone(getContext(), uri != null ? uri.toString() : Uri.EMPTY.toString());
uri = uri == null ? Uri.EMPTY : uri;
NotificationChannels.updateMessageRingtone(getContext(), uri );
TextSecurePreferences.setNotificationRingtone(getContext(), uri.toString());
}
initializeRingtoneSummary(findPreference(TextSecurePreferences.RINGTONE_PREF));