diff --git a/lib/pangea/choreographer/controllers/choreographer.dart b/lib/pangea/choreographer/controllers/choreographer.dart index 6f65ea836..edb364f80 100644 --- a/lib/pangea/choreographer/controllers/choreographer.dart +++ b/lib/pangea/choreographer/controllers/choreographer.dart @@ -536,9 +536,9 @@ class Choreographer { chatController.room, ); - bool get itAutoPlayEnabled { - return pangeaController.userController.profile.userSettings.itAutoPlay; - } + // bool get itAutoPlayEnabled { + // return pangeaController.userController.profile.userSettings.itAutoPlay; + // } bool get definitionsEnabled => pangeaController.permissionsController.isToolEnabled( diff --git a/lib/pangea/choreographer/controllers/igc_controller.dart b/lib/pangea/choreographer/controllers/igc_controller.dart index ed770cca4..6d0e848aa 100644 --- a/lib/pangea/choreographer/controllers/igc_controller.dart +++ b/lib/pangea/choreographer/controllers/igc_controller.dart @@ -99,7 +99,7 @@ class IgcController { final PangeaMatch match = igcTextData!.matches[firstMatchIndex]; if (match.isITStart && - choreographer.itAutoPlayEnabled && + // choreographer.itAutoPlayEnabled && igcTextData != null) { choreographer.onITStart(igcTextData!.matches[firstMatchIndex]); return; diff --git a/lib/pangea/models/user_model.dart b/lib/pangea/models/user_model.dart index 515b64088..1fdebef3a 100644 --- a/lib/pangea/models/user_model.dart +++ b/lib/pangea/models/user_model.dart @@ -12,7 +12,7 @@ class UserSettings { DateTime? dateOfBirth; DateTime? createdAt; bool autoPlayMessages; - bool itAutoPlay; + // bool itAutoPlay; bool activatedFreeTrial; bool publicProfile; String? targetLanguage; @@ -23,7 +23,7 @@ class UserSettings { this.dateOfBirth, this.createdAt, this.autoPlayMessages = false, - this.itAutoPlay = true, + // this.itAutoPlay = true, this.activatedFreeTrial = false, this.publicProfile = false, this.targetLanguage, @@ -37,7 +37,7 @@ class UserSettings { ? DateTime.parse(json[ModelKey.userCreatedAt]) : null, autoPlayMessages: json[ModelKey.autoPlayMessages] ?? false, - itAutoPlay: json[ModelKey.itAutoPlay] ?? true, + // itAutoPlay: json[ModelKey.itAutoPlay] ?? true, activatedFreeTrial: json[ModelKey.activatedTrialKey] ?? false, publicProfile: json[ModelKey.publicProfile] ?? false, targetLanguage: json[ModelKey.l2LanguageKey], @@ -50,7 +50,7 @@ class UserSettings { data[ModelKey.userDateOfBirth] = dateOfBirth?.toIso8601String(); data[ModelKey.userCreatedAt] = createdAt?.toIso8601String(); data[ModelKey.autoPlayMessages] = autoPlayMessages; - data[ModelKey.itAutoPlay] = itAutoPlay; + // data[ModelKey.itAutoPlay] = itAutoPlay; data[ModelKey.activatedTrialKey] = activatedFreeTrial; data[ModelKey.publicProfile] = publicProfile; data[ModelKey.l2LanguageKey] = targetLanguage; @@ -96,9 +96,9 @@ class UserSettings { autoPlayMessages: (accountData[ModelKey.autoPlayMessages] ?.content[ModelKey.autoPlayMessages] as bool?) ?? false, - itAutoPlay: (accountData[ModelKey.itAutoPlay] - ?.content[ModelKey.itAutoPlay] as bool?) ?? - true, + // itAutoPlay: (accountData[ModelKey.itAutoPlay] + // ?.content[ModelKey.itAutoPlay] as bool?) ?? + // true, activatedFreeTrial: (accountData[ModelKey.activatedTrialKey] ?.content[ModelKey.activatedTrialKey] as bool?) ?? false, diff --git a/lib/pangea/pages/settings_learning/settings_learning_view.dart b/lib/pangea/pages/settings_learning/settings_learning_view.dart index 943d81ca2..13dd8d4d7 100644 --- a/lib/pangea/pages/settings_learning/settings_learning_view.dart +++ b/lib/pangea/pages/settings_learning/settings_learning_view.dart @@ -48,19 +48,19 @@ class SettingsLearningView extends StatelessWidget { value, ), ), - ProfileSettingsSwitchListTile.adaptive( - defaultValue: controller.pangeaController.userController.profile - .userSettings.itAutoPlay, - title: - L10n.of(context)!.interactiveTranslatorAutoPlaySliderHeader, - subtitle: L10n.of(context)!.interactiveTranslatorAutoPlayDesc, - onChange: (bool value) => controller - .pangeaController.userController - .updateProfile((profile) { - profile.userSettings.itAutoPlay = value; - return profile; - }), - ), + // ProfileSettingsSwitchListTile.adaptive( + // defaultValue: controller.pangeaController.userController.profile + // .userSettings.itAutoPlay, + // title: + // L10n.of(context)!.interactiveTranslatorAutoPlaySliderHeader, + // subtitle: L10n.of(context)!.interactiveTranslatorAutoPlayDesc, + // onChange: (bool value) => controller + // .pangeaController.userController + // .updateProfile((profile) { + // profile.userSettings.itAutoPlay = value; + // return profile; + // }), + // ), // ProfileSettingsSwitchListTile.adaptive( // defaultValue: controller.pangeaController.userController.profile // .userSettings.autoPlayMessages, diff --git a/lib/pangea/widgets/igc/pangea_text_controller.dart b/lib/pangea/widgets/igc/pangea_text_controller.dart index b7bbc1af8..a8ad07d71 100644 --- a/lib/pangea/widgets/igc/pangea_text_controller.dart +++ b/lib/pangea/widgets/igc/pangea_text_controller.dart @@ -90,7 +90,7 @@ class PangeaTextController extends TextEditingController { // if autoplay on and it start then just start it if (matchIndex != -1 && - choreographer.itAutoPlayEnabled && + // choreographer.itAutoPlayEnabled && choreographer.igc.igcTextData!.matches[matchIndex].isITStart) { return choreographer.onITStart( choreographer.igc.igcTextData!.matches[matchIndex], diff --git a/lib/pangea/widgets/igc/span_card.dart b/lib/pangea/widgets/igc/span_card.dart index ddfa43ba4..63ecad332 100644 --- a/lib/pangea/widgets/igc/span_card.dart +++ b/lib/pangea/widgets/igc/span_card.dart @@ -355,16 +355,16 @@ class WordMatchContent extends StatelessWidget { ), ], ), - if (controller.widget.scm.pangeaMatch!.isITStart) - DontShowSwitchListTile( - controller: pangeaController, - onSwitch: (bool value) { - pangeaController.userController.updateProfile((profile) { - profile.userSettings.itAutoPlay = value; - return profile; - }); - }, - ), + // if (controller.widget.scm.pangeaMatch!.isITStart) + // DontShowSwitchListTile( + // controller: pangeaController, + // onSwitch: (bool value) { + // pangeaController.userController.updateProfile((profile) { + // profile.userSettings.itAutoPlay = value; + // return profile; + // }); + // }, + // ), ], ), ],