mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: enable navigator.setAppBadge/clearAppBadge (#27067)
This commit is contained in:
committed by
GitHub
parent
8b74361b0c
commit
c5a41defbd
@@ -130,10 +130,10 @@ base::string16 Browser::GetApplicationNameForProtocol(const GURL& url) {
|
||||
return base::ASCIIToUTF16(GetXdgAppOutput(argv).value_or(std::string()));
|
||||
}
|
||||
|
||||
bool Browser::SetBadgeCount(int count) {
|
||||
if (IsUnityRunning()) {
|
||||
unity::SetDownloadCount(count);
|
||||
badge_count_ = count;
|
||||
bool Browser::SetBadgeCount(base::Optional<int> count) {
|
||||
if (IsUnityRunning() && count.has_value()) {
|
||||
unity::SetDownloadCount(count.value());
|
||||
badge_count_ = count.value();
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user