mirror of
https://github.com/nostrlabs-io/zap-stream-flutter.git
synced 2025-06-15 03:46:33 +00:00
chore: cleanup context routing
This commit is contained in:
@ -26,7 +26,9 @@ class LoginPage extends StatelessWidget {
|
||||
if (result['signature'] != null) {
|
||||
final key = bech32ToHex(result['signature']);
|
||||
loginData.value = LoginAccount.externalPublicKeyHex(key);
|
||||
ctx.go("/");
|
||||
if (ctx.mounted) {
|
||||
ctx.go("/");
|
||||
}
|
||||
}
|
||||
},
|
||||
);
|
||||
|
@ -99,7 +99,9 @@ class _NewAccountPage extends State<NewAccountPage> {
|
||||
loginData.value = LoginAccount.privateKeyHex(
|
||||
_privateKey.privateKey!,
|
||||
);
|
||||
context.go("/");
|
||||
if (context.mounted) {
|
||||
context.go("/");
|
||||
}
|
||||
})
|
||||
.catchError((e) {
|
||||
setState(() {
|
||||
|
@ -1,5 +1,3 @@
|
||||
import 'dart:developer' as developer;
|
||||
|
||||
import 'package:collection/collection.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:ndk/ndk.dart';
|
||||
@ -327,6 +325,7 @@ class _ChatMessageWidget extends StatelessWidget {
|
||||
if (reactions.isNotEmpty)
|
||||
...reactions
|
||||
.fold(<String, Set<String>>{}, (acc, v) {
|
||||
// ignore: prefer_collection_literals
|
||||
acc[v.content] ??= Set();
|
||||
acc[v.content]!.add(v.pubKey);
|
||||
return acc;
|
||||
|
Reference in New Issue
Block a user