@@ -152,27 +152,6 @@ class LiquidKeyboard(private val context: Context) : ClipboardHelper.OnClipboard
152
152
return @setListener
153
153
}
154
154
}
155
-
156
- val tag = TabManager .get().getTabSwitchTabTag(position)
157
- val truePosition = TabManager .get().getTabSwitchPosition(position)
158
- if (tag != null ) {
159
- Timber .v(
160
- " TABS click: " +
161
- " position = $position , truePosition = $truePosition , tag.text = ${tag.text} " ,
162
- )
163
- if (tag.type == = SymbolKeyboardType .NO_KEY ) {
164
- when (tag.command) {
165
- KeyCommandType .EXIT -> service.selectLiquidKeyboard(- 1 )
166
- KeyCommandType .DEL_LEFT , KeyCommandType .DEL_RIGHT , KeyCommandType .REDO , KeyCommandType .UNDO -> {}
167
- else -> {}
168
- }
169
- } else if (TabManager .get().isAfterTabSwitch(truePosition)) {
170
- // tab的位置在“更多”的右侧,不滚动tab,焦点仍然在”更多“上
171
- select(truePosition)
172
- } else {
173
- service.selectLiquidKeyboard(truePosition)
174
- }
175
- }
176
155
}
177
156
}
178
157
@@ -338,6 +317,27 @@ class LiquidKeyboard(private val context: Context) : ClipboardHelper.OnClipboard
338
317
if (tabTag.type == = SymbolKeyboardType .SYMBOL ) {
339
318
service.inputSymbol(bean.text)
340
319
return @setListener
320
+ } else if (tabTag.type == = SymbolKeyboardType .TABS ) {
321
+ val tag = TabManager .get().getTabSwitchTabTag(position)
322
+ val truePosition = TabManager .get().getTabSwitchPosition(position)
323
+ if (tag != null ) {
324
+ Timber .v(
325
+ " TABS click: " + " position = $position , truePosition = $truePosition , tag.text = ${tag.text} " ,
326
+ )
327
+ if (tag.type == = SymbolKeyboardType .NO_KEY ) {
328
+ when (tag.command) {
329
+ KeyCommandType .EXIT -> service.selectLiquidKeyboard(- 1 )
330
+ KeyCommandType .DEL_LEFT , KeyCommandType .DEL_RIGHT , KeyCommandType .REDO , KeyCommandType .UNDO -> {}
331
+ else -> {}
332
+ }
333
+ } else if (TabManager .get().isAfterTabSwitch(truePosition)) {
334
+ // tab的位置在“更多”的右侧,不滚动tab,焦点仍然在”更多“上
335
+ select(truePosition)
336
+ } else {
337
+ service.selectLiquidKeyboard(truePosition)
338
+ }
339
+ }
340
+ return @setListener
341
341
}
342
342
}
343
343
service.currentInputConnection?.commitText(data[position].text, 1 )
0 commit comments