diff options
author | 2022-10-05 17:00:05 +0530 | |
---|---|---|
committer | 2022-10-05 19:31:04 +0530 | |
commit | e537e033d0106c099043469e76c52ebdc2029291 (patch) | |
tree | eb1e3cd21cd789080d3ea7d752630280a9ee2424 /src/components/services/tabs | |
parent | prevent from hibernating when media playing (diff) | |
download | ferdium-app-e537e033d0106c099043469e76c52ebdc2029291.tar.gz ferdium-app-e537e033d0106c099043469e76c52ebdc2029291.tar.zst ferdium-app-e537e033d0106c099043469e76c52ebdc2029291.zip |
hide media badge when disabled and not playing
Diffstat (limited to 'src/components/services/tabs')
-rw-r--r-- | src/components/services/tabs/TabItem.js | 7 | ||||
-rw-r--r-- | src/components/services/tabs/Tabbar.js | 1 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/components/services/tabs/TabItem.js b/src/components/services/tabs/TabItem.js index 5b901f3bf..ccf4e8d18 100644 --- a/src/components/services/tabs/TabItem.js +++ b/src/components/services/tabs/TabItem.js | |||
@@ -350,9 +350,10 @@ class TabItem extends Component { | |||
350 | ); | 350 | ); |
351 | } | 351 | } |
352 | 352 | ||
353 | const mediaBadge = service.isMediaPlaying ? ( | 353 | const showMediaBadge = service.isMediaPlaying && service.isEnabled; |
354 | const mediaBadge = ( | ||
354 | <Icon icon={mdiVolumeSource} className="tab-item__icon" /> | 355 | <Icon icon={mdiVolumeSource} className="tab-item__icon" /> |
355 | ) : null; | 356 | ); |
356 | 357 | ||
357 | return ( | 358 | return ( |
358 | <li | 359 | <li |
@@ -379,7 +380,7 @@ class TabItem extends Component { | |||
379 | )} | 380 | )} |
380 | {notificationBadge} | 381 | {notificationBadge} |
381 | {errorBadge} | 382 | {errorBadge} |
382 | {mediaBadge} | 383 | {showMediaBadge && mediaBadge} |
383 | {IS_SERVICE_DEBUGGING_ENABLED && ( | 384 | {IS_SERVICE_DEBUGGING_ENABLED && ( |
384 | <> | 385 | <> |
385 | <div | 386 | <div |
diff --git a/src/components/services/tabs/Tabbar.js b/src/components/services/tabs/Tabbar.js index f0cb48e5e..0eaf641e3 100644 --- a/src/components/services/tabs/Tabbar.js +++ b/src/components/services/tabs/Tabbar.js | |||
@@ -43,6 +43,7 @@ class TabBar extends Component { | |||
43 | serviceId, | 43 | serviceId, |
44 | serviceData: { | 44 | serviceData: { |
45 | isEnabled, | 45 | isEnabled, |
46 | isMediaPlaying: false, | ||
46 | }, | 47 | }, |
47 | redirect: false, | 48 | redirect: false, |
48 | }); | 49 | }); |