mirror of
https://github.com/nostrlabs-io/zap-stream-flutter.git
synced 2025-06-18 20:57:14 +00:00
fix: chat zap display
This commit is contained in:
@ -312,8 +312,15 @@ class _ChatMessageWidget extends StatelessWidget {
|
|||||||
Container(
|
Container(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 4, vertical: 2),
|
padding: EdgeInsets.symmetric(horizontal: 4, vertical: 2),
|
||||||
decoration: BoxDecoration(color: LAYER_2, borderRadius: DEFAULT_BR),
|
decoration: BoxDecoration(color: LAYER_2, borderRadius: DEFAULT_BR),
|
||||||
child: Text(
|
child: Row(
|
||||||
formatSats(zaps.fold(0, (acc, v) => acc + (v.amountSats ?? 0))),
|
children: [
|
||||||
|
Icon(Icons.bolt, color: ZAP_1, size: 16),
|
||||||
|
Text(
|
||||||
|
formatSats(
|
||||||
|
zaps.fold(0, (acc, v) => acc + (v.amountSats ?? 0)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (reactions.isNotEmpty)
|
if (reactions.isNotEmpty)
|
||||||
@ -339,16 +346,11 @@ class _ChatMessageWidget extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class _WriteMessageWidget extends StatefulWidget {
|
class _WriteMessageWidget extends StatelessWidget {
|
||||||
final StreamEvent stream;
|
final StreamEvent stream;
|
||||||
|
|
||||||
const _WriteMessageWidget({required this.stream});
|
_WriteMessageWidget({required this.stream});
|
||||||
|
|
||||||
@override
|
|
||||||
State<StatefulWidget> createState() => __WriteMessageWidget();
|
|
||||||
}
|
|
||||||
|
|
||||||
class __WriteMessageWidget extends State<_WriteMessageWidget> {
|
|
||||||
final TextEditingController _controller = TextEditingController();
|
final TextEditingController _controller = TextEditingController();
|
||||||
|
|
||||||
Future<void> _sendMessage() async {
|
Future<void> _sendMessage() async {
|
||||||
@ -360,7 +362,7 @@ class __WriteMessageWidget extends State<_WriteMessageWidget> {
|
|||||||
kind: 1311,
|
kind: 1311,
|
||||||
content: _controller.text,
|
content: _controller.text,
|
||||||
tags: [
|
tags: [
|
||||||
["a", widget.stream.aTag],
|
["a", stream.aTag],
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
developer.log(chatMsg.toString());
|
developer.log(chatMsg.toString());
|
||||||
|
Reference in New Issue
Block a user