🐛 Bug fixes
⬆️ Add firebase performance
This commit is contained in:
@ -63,7 +63,7 @@ class Event {
|
||||
class EventMessageBody {
|
||||
String text;
|
||||
String algorithm;
|
||||
List<int>? attachments;
|
||||
List<String>? attachments;
|
||||
int? quoteEvent;
|
||||
int? relatedEvent;
|
||||
List<int>? relatedUsers;
|
||||
@ -82,7 +82,7 @@ class EventMessageBody {
|
||||
text: json['text'] ?? '',
|
||||
algorithm: json['algorithm'] ?? 'plain',
|
||||
attachments: json['attachments'] != null
|
||||
? List<int>.from(json['attachments'].map((x) => x))
|
||||
? List<String>.from(json['attachments'].map((x) => x))
|
||||
: null,
|
||||
quoteEvent: json['quote_event'],
|
||||
relatedEvent: json['related_event'],
|
||||
|
@ -36,7 +36,7 @@ class Sticker {
|
||||
|
||||
String get imageUrl => ServiceFinder.buildUrl(
|
||||
'files',
|
||||
'/attachments/$attachmentId',
|
||||
'/attachments/${attachment.rid}',
|
||||
);
|
||||
|
||||
factory Sticker.fromJson(Map<String, dynamic> json) => Sticker(
|
||||
|
@ -66,7 +66,7 @@ class _StickerScreenState extends State<StickerScreen> {
|
||||
Widget _buildEmoteEntry(Sticker item, String prefix) {
|
||||
final imageUrl = ServiceFinder.buildUrl(
|
||||
'files',
|
||||
'/attachments/${item.attachmentId}',
|
||||
'/attachments/${item.attachment.rid}',
|
||||
);
|
||||
return ListTile(
|
||||
title: Text(item.name),
|
||||
|
@ -1,3 +1,4 @@
|
||||
import 'package:firebase_analytics/firebase_analytics.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:solian/theme.dart';
|
||||
@ -29,6 +30,15 @@ class RootShell extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
final routeName = state.topRoute?.name;
|
||||
|
||||
if (routeName != null) {
|
||||
FirebaseAnalytics.instance.logEvent(
|
||||
name: 'screen_view',
|
||||
parameters: {
|
||||
'firebase_screen': routeName,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
return Scaffold(
|
||||
key: rootScaffoldKey,
|
||||
drawer: SolianTheme.isLargeScreen(context)
|
||||
|
Reference in New Issue
Block a user