Use std::string::empty to check
This commit is contained in:
parent
1e1087abbb
commit
75b990faff
1 changed files with 3 additions and 3 deletions
|
@ -48,10 +48,10 @@ void CocoaNotification::Show(const NotificationOptions& options) {
|
||||||
|
|
||||||
if (options.silent) {
|
if (options.silent) {
|
||||||
[notification_ setSoundName:nil];
|
[notification_ setSoundName:nil];
|
||||||
} else if (options.sound != nil) {
|
} else if (options.sound.empty()) {
|
||||||
[notification_ setSoundName:base::SysUTF16ToNSString(options.sound)];
|
|
||||||
} else {
|
|
||||||
[notification_ setSoundName:NSUserNotificationDefaultSoundName];
|
[notification_ setSoundName:NSUserNotificationDefaultSoundName];
|
||||||
|
} else {
|
||||||
|
[notification_ setSoundName:base::SysUTF16ToNSString(options.sound)];
|
||||||
}
|
}
|
||||||
|
|
||||||
[notification_ setHasActionButton:false];
|
[notification_ setHasActionButton:false];
|
||||||
|
|
Loading…
Reference in a new issue