|
|
|
|
@ -47,9 +47,11 @@ class PangeaTextController extends TextEditingController {
|
|
|
|
|
debugger(when: kDebugMode);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
final CanSendStatus canSendStatus =
|
|
|
|
|
choreographer.pangeaController.subscriptionController.canSendStatus;
|
|
|
|
|
if (canSendStatus == CanSendStatus.showPaywall &&
|
|
|
|
|
|
|
|
|
|
// show the paywall if appropriate
|
|
|
|
|
if (choreographer
|
|
|
|
|
.pangeaController.subscriptionController.subscriptionStatus ==
|
|
|
|
|
SubscriptionStatus.showPaywall &&
|
|
|
|
|
!choreographer.isFetching &&
|
|
|
|
|
text.isNotEmpty) {
|
|
|
|
|
OverlayUtil.showPositionedCard(
|
|
|
|
|
@ -63,11 +65,18 @@ class PangeaTextController extends TextEditingController {
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// if there is no igc text data, then don't do anything
|
|
|
|
|
if (choreographer.igc.igcTextData == null) return;
|
|
|
|
|
|
|
|
|
|
// debugPrint(
|
|
|
|
|
// "onInputTap matches are ${choreographer.igc.igcTextData?.matches.map((e) => e.match.rule.id).toList().toString()}");
|
|
|
|
|
|
|
|
|
|
// if user is just trying to get their cursor into the text input field to add soemthing,
|
|
|
|
|
// then don't interrupt them
|
|
|
|
|
if (selection.baseOffset >= text.length) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
final int tokenIndex = choreographer.igc.igcTextData!.tokenIndexByOffset(
|
|
|
|
|
selection.baseOffset,
|
|
|
|
|
);
|
|
|
|
|
@ -147,9 +156,9 @@ class PangeaTextController extends TextEditingController {
|
|
|
|
|
// debugPrint("composing after ${value.composing.textAfter(value.text)}");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
final CanSendStatus canSendStatus =
|
|
|
|
|
choreographer.pangeaController.subscriptionController.canSendStatus;
|
|
|
|
|
if (canSendStatus == CanSendStatus.showPaywall &&
|
|
|
|
|
final SubscriptionStatus canSendStatus = choreographer
|
|
|
|
|
.pangeaController.subscriptionController.subscriptionStatus;
|
|
|
|
|
if (canSendStatus == SubscriptionStatus.showPaywall &&
|
|
|
|
|
!choreographer.isFetching &&
|
|
|
|
|
text.isNotEmpty) {
|
|
|
|
|
return TextSpan(
|
|
|
|
|
|