Merge branch 'main' into show-subspace-parents
This commit is contained in:
commit
3925a700d9
3 changed files with 33 additions and 8 deletions
|
|
@ -55,6 +55,9 @@ class IgcController {
|
|||
try {
|
||||
if (choreographer.currentText.isEmpty) return clear();
|
||||
|
||||
// the error spans are going to be reloaded, so clear the cache
|
||||
_clearCache();
|
||||
|
||||
debugPrint('getIGCTextData called with ${choreographer.currentText}');
|
||||
|
||||
debugPrint('getIGCTextData called with tokensOnly = $tokensOnly');
|
||||
|
|
@ -287,6 +290,7 @@ class IgcController {
|
|||
|
||||
clear() {
|
||||
igcTextData = null;
|
||||
_clearCache();
|
||||
// Not sure why this is here
|
||||
// MatrixState.pAnyState.closeOverlay();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import 'dart:convert';
|
||||
|
||||
import 'package:collection/collection.dart';
|
||||
import 'package:fluffychat/pangea/config/environment.dart';
|
||||
import 'package:fluffychat/pangea/enum/span_choice_type.dart';
|
||||
import 'package:fluffychat/pangea/enum/span_data_type.dart';
|
||||
|
|
@ -80,15 +81,39 @@ class SpanDetailsRepoReqAndRes {
|
|||
bool operator ==(Object other) {
|
||||
if (identical(this, other)) return true;
|
||||
if (other is! SpanDetailsRepoReqAndRes) return false;
|
||||
|
||||
return toJson().toString() == other.toJson().toString();
|
||||
if (other.userL1 != userL1) return false;
|
||||
if (other.userL2 != userL2) return false;
|
||||
if (other.enableIT != enableIT) return false;
|
||||
if (other.enableIGC != enableIGC) return false;
|
||||
if (other.span.choices
|
||||
?.firstWhere(
|
||||
(choice) => choice.type == SpanChoiceType.bestCorrection,
|
||||
)
|
||||
.value !=
|
||||
span.choices
|
||||
?.firstWhere(
|
||||
(choice) => choice.type == SpanChoiceType.bestCorrection,
|
||||
)
|
||||
.value) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
/// Overrides the hashCode getter to generate a hash code for the [SpanDetailsRepoReqAndRes] object.
|
||||
/// Used as keys in response cache in igc_controller.
|
||||
@override
|
||||
int get hashCode {
|
||||
return toJson().toString().hashCode;
|
||||
return Object.hashAll([
|
||||
userL1.hashCode,
|
||||
userL2.hashCode,
|
||||
enableIT.hashCode,
|
||||
enableIGC.hashCode,
|
||||
span.choices
|
||||
?.firstWhereOrNull(
|
||||
(choice) => choice.type == SpanChoiceType.bestCorrection,
|
||||
)
|
||||
?.value
|
||||
.hashCode,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,11 +19,7 @@ class BotStyle {
|
|||
AppConfig.fontSizeFactor *
|
||||
(big == true ? 1.2 : 1),
|
||||
fontStyle: italics ? FontStyle.italic : null,
|
||||
color: setColor
|
||||
? Theme.of(context).brightness == Brightness.dark
|
||||
? AppConfig.primaryColorLight
|
||||
: AppConfig.primaryColor
|
||||
: null,
|
||||
color: setColor ? Theme.of(context).colorScheme.primary : null,
|
||||
inherit: true,
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue