@@ -114,7 +114,7 @@ const ConnectionsNavigationTree: React.FunctionComponent<
114114
115115 const getCollapseAfterForConnectedItem = useCallback (
116116 ( actions : NavigationItemActions ) => {
117- const [ firstAction , secondAction ] = actions ;
117+ const [ firstAction , secondAction , thirdAction ] = actions ;
118118
119119 const actionCanBeShownInline = (
120120 action : NavigationItemActions [ number ]
@@ -123,31 +123,31 @@ const ConnectionsNavigationTree: React.FunctionComponent<
123123 return false ;
124124 }
125125
126- return [ 'create-database' , 'open-shell' ] . includes (
126+ return [ 'refresh-databases' , ' create-database', 'open-shell' ] . includes (
127127 ( action as ItemAction < Actions > ) . action
128128 ) ;
129129 } ;
130130
131131 // this is the normal case for a connection that is writable and when we
132132 // also have shell enabled
133133 if (
134- actionCanBeShownInline ( firstAction ) &&
135- actionCanBeShownInline ( secondAction )
134+ actionCanBeShownInline ( secondAction ) &&
135+ actionCanBeShownInline ( thirdAction )
136136 ) {
137- return 2 ;
137+ return 3 ;
138138 }
139139
140140 // this will happen when the either the connection is not writable or the
141141 // preference is readonly, or shell is not enabled in which case we either
142142 // do not show create-database action or open-shell action
143143 if (
144- actionCanBeShownInline ( firstAction ) ||
145- actionCanBeShownInline ( secondAction )
144+ actionCanBeShownInline ( secondAction ) ||
145+ actionCanBeShownInline ( thirdAction )
146146 ) {
147- return 1 ;
147+ return 2 ;
148148 }
149149
150- return 0 ;
150+ return 1 ;
151151 } ,
152152 [ ]
153153 ) ;
0 commit comments