|
|
|
@ -68,7 +68,7 @@ class Choreographer {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void send(BuildContext context) {
|
|
|
|
void send(BuildContext context) {
|
|
|
|
if (isFetching) return;
|
|
|
|
if (!canSendMessage) return;
|
|
|
|
|
|
|
|
|
|
|
|
if (pangeaController.subscriptionController.subscriptionStatus ==
|
|
|
|
if (pangeaController.subscriptionController.subscriptionStatus ==
|
|
|
|
SubscriptionStatus.showPaywall) {
|
|
|
|
SubscriptionStatus.showPaywall) {
|
|
|
|
@ -92,7 +92,7 @@ class Choreographer {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Future<void> _sendWithIGC(BuildContext context) async {
|
|
|
|
Future<void> _sendWithIGC(BuildContext context) async {
|
|
|
|
if (!igc.canSendMessage) {
|
|
|
|
if (!canSendMessage) {
|
|
|
|
igc.showFirstMatch(context);
|
|
|
|
igc.showFirstMatch(context);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -571,7 +571,7 @@ class Choreographer {
|
|
|
|
return AssistanceState.noMessage;
|
|
|
|
return AssistanceState.noMessage;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (igc.igcTextData?.matches.isNotEmpty ?? false) {
|
|
|
|
if ((igc.igcTextData?.matches.isNotEmpty ?? false) || isRunningIT) {
|
|
|
|
return AssistanceState.fetched;
|
|
|
|
return AssistanceState.fetched;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ -585,4 +585,20 @@ class Choreographer {
|
|
|
|
|
|
|
|
|
|
|
|
return AssistanceState.complete;
|
|
|
|
return AssistanceState.complete;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool get canSendMessage {
|
|
|
|
|
|
|
|
if (isFetching) return false;
|
|
|
|
|
|
|
|
if (errorService.isError) return true;
|
|
|
|
|
|
|
|
if (itEnabled && isRunningIT) return false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
final hasITMatches =
|
|
|
|
|
|
|
|
igc.igcTextData!.matches.any((match) => match.isITStart);
|
|
|
|
|
|
|
|
final hasIGCMatches =
|
|
|
|
|
|
|
|
igc.igcTextData!.matches.any((match) => !match.isITStart);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ((itEnabled && hasITMatches) || (igcEnabled && hasIGCMatches)) {
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|