@@ -23,7 +23,7 @@ const TabPages = require('../../app/renderer/components/tabs/tabPages')
23
23
const TabsToolbar = require ( '../../app/renderer/components/tabs/tabsToolbar' )
24
24
const FindBar = require ( './findbar' )
25
25
const UpdateBar = require ( './updateBar' )
26
- const NotificationBar = require ( './notificationBar' )
26
+ const { NotificationBar} = require ( './notificationBar' )
27
27
const DownloadsBar = require ( '../../app/renderer/components/downloadsBar' )
28
28
const SiteInfo = require ( './siteInfo' )
29
29
const BraveryPanel = require ( './braveryPanel' )
@@ -732,6 +732,10 @@ class Main extends ImmutableComponent {
732
732
733
733
const appStateSites = this . props . appState . get ( 'sites' )
734
734
735
+ const notifications = this . props . appState . get ( 'notifications' )
736
+ const hasNotifications = notifications && notifications . size
737
+ const notificationBarOrigin = notifications . map ( bar => bar . get ( 'frameOrigin' ) )
738
+
735
739
return < div id = 'window'
736
740
className = { cx ( {
737
741
isFullScreen : activeFrame && activeFrame . get ( 'isFullScreen' ) ,
@@ -860,12 +864,6 @@ class Main extends ImmutableComponent {
860
864
}
861
865
862
866
< UpdateBar updates = { this . props . appState . get ( 'updates' ) } />
863
- {
864
- this . props . appState . get ( 'notifications' ) && this . props . appState . get ( 'notifications' ) . size && activeFrame
865
- ? < NotificationBar notifications = { this . props . appState . get ( 'notifications' ) }
866
- activeFrame = { activeFrame } />
867
- : null
868
- }
869
867
{
870
868
showBookmarksToolbar
871
869
? < BookmarksToolbar
@@ -909,12 +907,18 @@ class Main extends ImmutableComponent {
909
907
key = 'tab-bar'
910
908
activeFrameKey = { ( activeFrame && activeFrame . get ( 'key' ) ) || undefined }
911
909
onMenu = { this . onHamburgerMenu }
910
+ notificationBarActive = { notificationBarOrigin }
912
911
hasTabInFullScreen = {
913
912
sortedFrames
914
913
. map ( ( frame ) => frame . get ( 'isFullScreen' ) )
915
914
. some ( fullScreenMode => fullScreenMode === true )
916
915
}
917
916
/>
917
+ {
918
+ hasNotifications && activeFrame
919
+ ? < NotificationBar notifications = { notifications } activeFrame = { activeFrame } />
920
+ : null
921
+ }
918
922
919
923
{
920
924
activeFrame && activeFrame . get ( 'findbarShown' ) && ! activeFrame . get ( 'isFullScreen' )
0 commit comments