File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed 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 }
@@ -106,9 +109,12 @@ public function add($entry) {
106109 $ entry ['type ' ] = 'link ' ;
107110 }
108111
109- $ id = $ entry ['id ' ];
110- $ entry ['unread ' ] = $ this ->unreadCounters [$ id ] ?? 0 ;
111112 if ($ entry ['type ' ] === 'link ' ) {
113+ // app might not be set when using closures, in this case try to fallback to ID
114+ if (!isset ($ entry ['app ' ]) && $ this ->appManager ->isEnabledForUser ($ id )) {
115+ $ entry ['app ' ] = $ id ;
116+ }
117+
112118 // This is the default app that will always be shown first
113119 $ entry ['default ' ] = ($ entry ['app ' ] ?? false ) === $ this ->defaultApp ;
114120 // Set order from user defined app order
You can’t perform that action at this time.
0 commit comments