fix: fixes for sentry issues (#1500)

This commit is contained in:
ggurdin 2025-01-17 14:43:15 -05:00 committed by GitHub
parent cdfc8b831e
commit fd3f851995
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 10 additions and 10 deletions

View file

@ -127,7 +127,7 @@ extension AnalyticsClientExtension on Client {
final Random random = Random();
for (final space in spaces) {
if (userID == null) return;
if (userID == null || !space.canSendEvent(EventTypes.SpaceChild)) return;
final List<Room> roomsNotAdded = _allMyAnalyticsRooms.where((room) {
return !space.spaceChildren.any((child) => child.roomId == room.id);
}).toList();

View file

@ -1,5 +1,3 @@
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:fluffychat/pangea/analytics/enums/construct_type_enum.dart';
@ -16,7 +14,6 @@ import 'package:fluffychat/widgets/matrix.dart';
class LemmaMeaningActivityGenerator {
Future<MessageActivityResponse> get(
MessageActivityRequest req,
BuildContext context,
) async {
final ConstructIdentifier lemmaId = ConstructIdentifier(
lemma: req.targetTokens[0].lemma.text.isNotEmpty
@ -50,8 +47,8 @@ class LemmaMeaningActivityGenerator {
langCode: req.userL2,
activityType: ActivityTypeEnum.wordMeaning,
content: ActivityContent(
question:
L10n.of(context).whatIsMeaning(lemmaId.lemma, lemmaId.category),
question: L10n.of(MatrixState.pangeaController.matrixState.context)
.whatIsMeaning(lemmaId.lemma, lemmaId.category),
choices: choices,
answers: [res.meaning],
spanDisplayDetails: null,

View file

@ -133,7 +133,7 @@ class PracticeGenerationController {
case ActivityTypeEnum.morphId:
return _morph.get(req);
case ActivityTypeEnum.wordMeaning:
return _wordMeaning.get(req, context);
return _wordMeaning.get(req);
case ActivityTypeEnum.wordFocusListening:
case ActivityTypeEnum.hiddenWordListening:
return _fetchFromServer(

View file

@ -27,9 +27,12 @@ class _PresenceBuilderState extends State<PresenceBuilder> {
StreamSubscription<CachedPresence>? _sub;
void _updatePresence(CachedPresence? presence) {
setState(() {
_presence = presence;
});
// #Pangea
// setState(() {
// _presence = presence;
// });
if (mounted) setState(() => _presence = presence);
// Pangea#
}
@override