File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -95,7 +95,10 @@ public function add($entry) {
9595 return ;
9696 }
9797
98+ $ id = $ entry ['id ' ];
99+
98100 $ entry ['active ' ] = false ;
101+ $ entry ['unread ' ] = $ this ->unreadCounters [$ id ] ?? 0 ;
99102 if (!isset ($ entry ['icon ' ])) {
100103 $ entry ['icon ' ] = '' ;
101104 }
@@ -105,9 +108,11 @@ public function add($entry) {
105108 if (!isset ($ entry ['type ' ])) {
106109 $ entry ['type ' ] = 'link ' ;
107110 }
111+ // app might not be set when using closures, in this case try to fallback to ID
112+ if (!isset ($ entry ['app ' ]) && $ this ->appManager ->isEnabledForUser ($ id )) {
113+ $ entry ['app ' ] = $ id ;
114+ }
108115
109- $ id = $ entry ['id ' ];
110- $ entry ['unread ' ] = $ this ->unreadCounters [$ id ] ?? 0 ;
111116 if ($ entry ['type ' ] === 'link ' ) {
112117 // This is the default app that will always be shown first
113118 $ entry ['default ' ] = ($ entry ['app ' ] ?? false ) === $ this ->defaultApp ;
You can’t perform that action at this time.
0 commit comments