@@ -97,6 +97,17 @@ class QuickBar(
97
97
CandidateUi (context, candidate.compactCandidateModule.view)
98
98
}
99
99
100
+ private val suggestionUi by lazy {
101
+ SuggestionUi (context, candidate.suggestionCandidateModule.view).apply {
102
+ homeButton.setOnClickListener {
103
+ barStateMachine.push(
104
+ QuickBarStateMachine .TransitionEvent .SuggestionUpdated ,
105
+ QuickBarStateMachine .BooleanKey .SuggestionEmpty to true ,
106
+ )
107
+ }
108
+ }
109
+ }
110
+
100
111
private val tabUi by lazy {
101
112
TabUi (context)
102
113
}
@@ -183,6 +194,7 @@ class QuickBar(
183
194
add(alwaysUi.root, lParams(matchParent, matchParent))
184
195
add(candidateUi.root, lParams(matchParent, matchParent))
185
196
add(tabUi.root, lParams(matchParent, matchParent))
197
+ add(suggestionUi.root, lParams(matchParent, matchParent))
186
198
187
199
evalAlwaysUiState()
188
200
}
@@ -226,4 +238,11 @@ class QuickBar(
226
238
override fun onWindowDetached (window : BoardWindow ) {
227
239
barStateMachine.push(QuickBarStateMachine .TransitionEvent .WindowDetached )
228
240
}
241
+
242
+ override fun onInlineSuggestion (views : List <View >) {
243
+ barStateMachine.push(
244
+ QuickBarStateMachine .TransitionEvent .SuggestionUpdated ,
245
+ QuickBarStateMachine .BooleanKey .SuggestionEmpty to views.isEmpty(),
246
+ )
247
+ }
229
248
}
0 commit comments