From 7d92e81f56d1aba0c3ece7c53f086227fb3da50a Mon Sep 17 00:00:00 2001 From: avashilling <165050625+avashilling@users.noreply.github.com> Date: Thu, 26 Jun 2025 16:56:19 -0400 Subject: [PATCH] fix: only give user vocab in their L2 and animation tweaks --- lib/pangea/toolbar/widgets/message_selection_overlay.dart | 4 ++-- .../toolbar/widgets/word_zoom/new_word_overlay.dart | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/pangea/toolbar/widgets/message_selection_overlay.dart b/lib/pangea/toolbar/widgets/message_selection_overlay.dart index 93d0ea081..7a9753de0 100644 --- a/lib/pangea/toolbar/widgets/message_selection_overlay.dart +++ b/lib/pangea/toolbar/widgets/message_selection_overlay.dart @@ -121,7 +121,8 @@ class MessageOverlayController extends State newTokens = pangeaMessageEvent?.messageDisplayRepresentation?.tokens ?.where((token) { return token.lemma.saveVocab == true && - token.vocabConstruct.uses.isEmpty; + token.vocabConstruct.uses.isEmpty && + messageInUserL2; }).toList() ?? []; } @@ -611,7 +612,6 @@ class MessageOverlayController extends State t.text.offset == token.text.offset && t.text.length == token.text.length, ); - debugPrint("$token.text has been removed from newTokens list."); }); } }); diff --git a/lib/pangea/toolbar/widgets/word_zoom/new_word_overlay.dart b/lib/pangea/toolbar/widgets/word_zoom/new_word_overlay.dart index c5222daeb..f0317405d 100644 --- a/lib/pangea/toolbar/widgets/word_zoom/new_word_overlay.dart +++ b/lib/pangea/toolbar/widgets/word_zoom/new_word_overlay.dart @@ -43,10 +43,9 @@ class _NewWordOverlayState extends State ); _fadeAnim = CurvedAnimation( parent: _controller, - curve: const Interval(0.7, 1.0, curve: Curves.easeOut), + curve: const Interval(0.5, 1.0, curve: Curves.easeOut), ); - // Alignment animation: stays center until 0.5, then animates to topRight _alignmentAnim = AlignmentTween( begin: Alignment.center, end: Alignment.topRight, @@ -105,7 +104,10 @@ class _NewWordOverlayState extends State translation: _offsetAnim.value, child: ScaleTransition( scale: _xpScaleAnim, - child: xpSeedWidget, + child: Transform.scale( + scale: 2 * (1 - _fadeAnim.value), + child: xpSeedWidget, + ), ), ), );