Merge branch 'main' into conversation-bot-design

pull/1428/head
ggurdin 1 year ago committed by GitHub
commit ce5de8a93e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -49,9 +49,11 @@ class MissingVoiceButton extends StatelessWidget {
),
TextButton(
onPressed: () => launchTTSSettings,
style: const ButtonStyle(
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
),
// commenting out as suspecting this is causing an issue
// #freeze-activity
// style: const ButtonStyle(
// tapTargetSize: MaterialTapTargetSize.shrinkWrap,
// ),
child: Text(L10n.of(context)!.openVoiceSettings),
),
],

@ -3,11 +3,9 @@ import 'dart:developer';
import 'package:collection/collection.dart';
import 'package:fluffychat/pangea/choreographer/widgets/choice_array.dart';
import 'package:fluffychat/pangea/controllers/my_analytics_controller.dart';
import 'package:fluffychat/pangea/enum/activity_type_enum.dart';
import 'package:fluffychat/pangea/models/practice_activities.dart/practice_activity_model.dart';
import 'package:fluffychat/pangea/models/practice_activities.dart/practice_activity_record_model.dart';
import 'package:fluffychat/pangea/widgets/practice_activity/practice_activity_card.dart';
import 'package:fluffychat/pangea/widgets/practice_activity/word_audio_button.dart';
import 'package:fluffychat/widgets/matrix.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
@ -85,10 +83,12 @@ class MultipleChoiceActivityState extends State<MultipleChoiceActivity> {
widget.practiceCardController.onActivityFinish();
}
if (mounted) {
setState(
() => selectedChoiceIndex = index,
);
}
}
@override
Widget build(BuildContext context) {
@ -106,9 +106,10 @@ class MultipleChoiceActivityState extends State<MultipleChoiceActivity> {
),
),
const SizedBox(height: 8),
if (practiceActivity.activityType ==
ActivityTypeEnum.wordFocusListening)
WordAudioButton(text: practiceActivity.content.answer),
// #freeze-activity
// if (practiceActivity.activityType ==
// ActivityTypeEnum.wordFocusListening)
// WordAudioButton(text: practiceActivity.content.answer),
ChoicesArray(
isLoading: false,
uniqueKeyForLayerLink: (index) => "multiple_choice_$index",

@ -175,6 +175,7 @@ class MessagePracticeActivityCardState extends State<PracticeActivityCard> {
);
Future<void> _savorTheJoy() async {
try {
debugger(when: savoringTheJoy && kDebugMode);
if (mounted) setState(() => savoringTheJoy = true);
@ -182,6 +183,18 @@ class MessagePracticeActivityCardState extends State<PracticeActivityCard> {
await Future.delayed(appropriateTimeForJoy);
if (mounted) setState(() => savoringTheJoy = false);
} catch (e, s) {
debugger(when: kDebugMode);
ErrorHandler.logError(
e: e,
s: s,
m: 'Failed to savor the joy',
data: {
'activity': currentActivity,
'record': currentCompletionRecord,
},
);
}
}
/// Called when the user finishes an activity.
@ -211,7 +224,8 @@ class MessagePracticeActivityCardState extends State<PracticeActivityCard> {
widget.pangeaMessageEvent.eventId,
);
//
// wait for the joy to be savored before resolving the activity
// and setting it to replace the previous activity
final Iterable<dynamic> result = await Future.wait([
_savorTheJoy(),
_fetchNewActivity(),

@ -22,6 +22,7 @@ class WordAudioButtonState extends State<WordAudioButton> {
@override
void initState() {
// TODO: implement initState
debugPrint('initState WordAudioButton');
super.initState();
ttsController.setupTTS().then((value) => setState(() {}));
}
@ -34,6 +35,7 @@ class WordAudioButtonState extends State<WordAudioButton> {
@override
Widget build(BuildContext context) {
debugPrint('build WordAudioButton');
return Column(
children: [
IconButton(
@ -67,7 +69,9 @@ class WordAudioButtonState extends State<WordAudioButton> {
}
}, // Disable button if language isn't supported
),
ttsController.missingVoiceButton,
// #freeze-activity
//commenting out to see if it's causing an issue
// ttsController.missingVoiceButton,
],
);
}

@ -6,7 +6,7 @@ description: Learn a language while texting your friends.
# Pangea#
publish_to: none
# On version bump also increase the build number for F-Droid
version: 1.21.5+3541
version: 1.21.5+3542
environment:
sdk: ">=3.0.0 <4.0.0"

Loading…
Cancel
Save