diff --git a/CustomKeyboard/View/KBStreamTextView.m b/CustomKeyboard/View/KBStreamTextView.m index 93f258e..5b82819 100644 --- a/CustomKeyboard/View/KBStreamTextView.m +++ b/CustomKeyboard/View/KBStreamTextView.m @@ -360,7 +360,6 @@ static inline NSString *KBTrimRight(NSString *s) { contextAfter = proxy.documentContextAfterInput ?: @""; } } - NSString *contextBefore = proxy.documentContextBeforeInput ?: @""; while (contextBefore.length > 0) { for (NSUInteger i = 0; i < contextBefore.length; i++) { @@ -372,6 +371,16 @@ static inline NSString *KBTrimRight(NSString *s) { if (rawText.length > 0) { [proxy insertText:rawText]; } + NSMutableDictionary *extra = [NSMutableDictionary dictionary]; + extra[@"send_text"] = rawText ? rawText : @""; + extra[@"index"] = index ? rawText : 0; + + [[KBMaiPointReporter sharedReporter] + reportClickWithEventName:@"send_stream_text_action" + pageId:@"keyboard_StreamTextView" + elementId:@"handle_label" + extra:extra.copy + completion:nil]; [[KBInputBufferManager shared] resetWithText:rawText ?: @""]; } }