@@ -139,9 +139,8 @@ export class DevframeDocksHost implements DevframeDocksHostType {
139139 }
140140 this . validateGroupMembership ( view )
141141 this . prepareRemoteRegistration ( view )
142- const entry = this . withBuiltinCategory ( view )
143- this . views . set ( entry . id , entry )
144- this . events . emit ( 'dock:entry:updated' , entry )
142+ this . views . set ( view . id , view )
143+ this . events . emit ( 'dock:entry:updated' , view )
145144
146145 return {
147146 update : ( patch ) => {
@@ -159,20 +158,8 @@ export class DevframeDocksHost implements DevframeDocksHostType {
159158 }
160159 this . validateGroupMembership ( view )
161160 this . prepareRemoteRegistration ( view )
162- const entry = this . withBuiltinCategory ( view )
163- this . views . set ( entry . id , entry )
164- this . events . emit ( 'dock:entry:updated' , entry )
165- }
166-
167- /**
168- * `~builtin` views default their category to `~builtin` so the viewer's
169- * native views group together and sort last — a high-level integration
170- * registering one needn't repeat the category.
171- */
172- private withBuiltinCategory < T extends DevframeDockUserEntry > ( view : T ) : T {
173- if ( view . type === '~builtin' && view . category === undefined )
174- return { ...view , category : '~builtin' }
175- return view
161+ this . views . set ( view . id , view )
162+ this . events . emit ( 'dock:entry:updated' , view )
176163 }
177164
178165 private validateGroupMembership ( view : DevframeDockUserEntry ) : void {
0 commit comments