Fixed text selection, removed translationEnabled
This commit is contained in:
parent
83b30dc084
commit
bb01635c9f
6 changed files with 34 additions and 30 deletions
|
|
@ -303,6 +303,10 @@ class MessageContent extends StatelessWidget {
|
|||
immersionMode: immersionMode,
|
||||
toolbarController: toolbarController,
|
||||
);
|
||||
} else if (pangeaMessageEvent != null) {
|
||||
toolbarController?.toolbar?.textSelection.setMessageText(
|
||||
pangeaMessageEvent!.body,
|
||||
);
|
||||
}
|
||||
// Pangea#
|
||||
return FutureBuilder<String>(
|
||||
|
|
|
|||
|
|
@ -545,11 +545,11 @@ class Choreographer {
|
|||
chatController.room,
|
||||
);
|
||||
|
||||
bool get translationEnabled =>
|
||||
pangeaController.permissionsController.isToolEnabled(
|
||||
ToolSetting.translations,
|
||||
chatController.room,
|
||||
);
|
||||
// bool get translationEnabled =>
|
||||
// pangeaController.permissionsController.isToolEnabled(
|
||||
// ToolSetting.translations,
|
||||
// chatController.room,
|
||||
// );
|
||||
|
||||
bool get isITandIGCEnabled =>
|
||||
pangeaController.permissionsController.isWritingAssistanceEnabled(
|
||||
|
|
|
|||
|
|
@ -17,9 +17,9 @@ class LanguageDisplayToggle extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (!controller.choreographer.translationEnabled) {
|
||||
return const SizedBox();
|
||||
}
|
||||
// if (!controller.choreographer.translationEnabled) {
|
||||
// return const SizedBox();
|
||||
// }
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ class UserController extends BaseController {
|
|||
final bool? immersionMode =
|
||||
migratedProfileInfo(MatrixProfile.immersionMode);
|
||||
final bool? definitions = migratedProfileInfo(MatrixProfile.definitions);
|
||||
final bool? translations = migratedProfileInfo(MatrixProfile.translations);
|
||||
// final bool? translations = migratedProfileInfo(MatrixProfile.translations);
|
||||
final bool? showItInstructions =
|
||||
migratedProfileInfo(MatrixProfile.showedItInstructions);
|
||||
final bool? showClickMessage =
|
||||
|
|
@ -147,7 +147,7 @@ class UserController extends BaseController {
|
|||
interactiveGrammar: interactiveGrammar,
|
||||
immersionMode: immersionMode,
|
||||
definitions: definitions,
|
||||
translations: translations,
|
||||
// translations: translations,
|
||||
showedItInstructions: showItInstructions,
|
||||
showedClickMessage: showClickMessage,
|
||||
showedBlurMeansTranslate: showBlurMeansTranslate,
|
||||
|
|
@ -228,7 +228,7 @@ class UserController extends BaseController {
|
|||
bool? interactiveGrammar,
|
||||
bool? immersionMode,
|
||||
bool? definitions,
|
||||
bool? translations,
|
||||
// bool? translations,
|
||||
bool? showedItInstructions,
|
||||
bool? showedClickMessage,
|
||||
bool? showedBlurMeansTranslate,
|
||||
|
|
@ -280,12 +280,12 @@ class UserController extends BaseController {
|
|||
definitions,
|
||||
);
|
||||
}
|
||||
if (translations != null) {
|
||||
await _pangeaController.pStoreService.save(
|
||||
MatrixProfile.translations.title,
|
||||
translations,
|
||||
);
|
||||
}
|
||||
// if (translations != null) {
|
||||
// await _pangeaController.pStoreService.save(
|
||||
// MatrixProfile.translations.title,
|
||||
// translations,
|
||||
// );
|
||||
// }
|
||||
if (showedItInstructions != null) {
|
||||
await _pangeaController.pStoreService.save(
|
||||
MatrixProfile.showedItInstructions.title,
|
||||
|
|
|
|||
|
|
@ -199,9 +199,9 @@ class PangeaRoomRules {
|
|||
case ToolSetting.definitions:
|
||||
definitions = value;
|
||||
break;
|
||||
case ToolSetting.translations:
|
||||
translations = value;
|
||||
break;
|
||||
// case ToolSetting.translations:
|
||||
// translations = value;
|
||||
// break;
|
||||
case ToolSetting.autoIGC:
|
||||
autoIGC = value;
|
||||
break;
|
||||
|
|
@ -275,8 +275,8 @@ class PangeaRoomRules {
|
|||
return immersionMode;
|
||||
case ToolSetting.definitions:
|
||||
return definitions;
|
||||
case ToolSetting.translations:
|
||||
return translations;
|
||||
// case ToolSetting.translations:
|
||||
// return translations;
|
||||
case ToolSetting.autoIGC:
|
||||
return autoIGC;
|
||||
default:
|
||||
|
|
@ -306,7 +306,7 @@ enum ToolSetting {
|
|||
interactiveGrammar,
|
||||
immersionMode,
|
||||
definitions,
|
||||
translations,
|
||||
// translations,
|
||||
autoIGC,
|
||||
}
|
||||
|
||||
|
|
@ -321,8 +321,8 @@ extension SettingCopy on ToolSetting {
|
|||
return L10n.of(context)!.toggleImmersionMode;
|
||||
case ToolSetting.definitions:
|
||||
return L10n.of(context)!.definitionsToolName;
|
||||
case ToolSetting.translations:
|
||||
return L10n.of(context)!.messageTranslationsToolName;
|
||||
// case ToolSetting.translations:
|
||||
// return L10n.of(context)!.messageTranslationsToolName;
|
||||
case ToolSetting.autoIGC:
|
||||
return L10n.of(context)!.autoIGCToolName;
|
||||
}
|
||||
|
|
@ -339,8 +339,8 @@ extension SettingCopy on ToolSetting {
|
|||
return L10n.of(context)!.toggleImmersionModeDesc;
|
||||
case ToolSetting.definitions:
|
||||
return L10n.of(context)!.definitionsToolDescription;
|
||||
case ToolSetting.translations:
|
||||
return L10n.of(context)!.translationsToolDescrption;
|
||||
// case ToolSetting.translations:
|
||||
// return L10n.of(context)!.translationsToolDescrption;
|
||||
case ToolSetting.autoIGC:
|
||||
return L10n.of(context)!.autoIGCToolDescription;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ enum MatrixProfile {
|
|||
interactiveGrammar,
|
||||
immersionMode,
|
||||
definitions,
|
||||
translations,
|
||||
// translations,
|
||||
showedItInstructions,
|
||||
showedClickMessage,
|
||||
showedBlurMeansTranslate,
|
||||
|
|
@ -88,8 +88,8 @@ extension MatrixProfileExtension on MatrixProfile {
|
|||
return ToolSetting.immersionMode.toString();
|
||||
case MatrixProfile.definitions:
|
||||
return ToolSetting.definitions.toString();
|
||||
case MatrixProfile.translations:
|
||||
return ToolSetting.translations.toString();
|
||||
// case MatrixProfile.translations:
|
||||
// return ToolSetting.translations.toString();
|
||||
case MatrixProfile.autoIGC:
|
||||
return ToolSetting.autoIGC.toString();
|
||||
case MatrixProfile.showedItInstructions:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue