comment out references to itAutoPlay setting

This commit is contained in:
ggurdin 2024-10-31 11:17:51 -04:00
parent d1d078e2b8
commit a7b6003c89
No known key found for this signature in database
GPG key ID: A01CB41737CBB478
6 changed files with 35 additions and 35 deletions

View file

@ -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(

View file

@ -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;

View file

@ -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,

View file

@ -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,

View file

@ -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],

View file

@ -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;
// });
// },
// ),
],
),
],