Finish implementing send page
This commit is contained in:
@@ -178,11 +178,12 @@ class _ChannelScannerResultMessageSendState extends State<ChannelScannerResultMe
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
UI.button(
|
||||
text: 'Web',
|
||||
UI.buttonIconOnly(
|
||||
icon: FontAwesomeIcons.earthAmericas,
|
||||
onPressed: _onOpenWeb,
|
||||
square: true,
|
||||
color: Theme.of(context).colorScheme.secondary,
|
||||
textColor: Theme.of(context).colorScheme.onSecondary,
|
||||
iconColor: Theme.of(context).colorScheme.onSecondary,
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -200,6 +201,9 @@ class _ChannelScannerResultMessageSendState extends State<ChannelScannerResultMe
|
||||
try {
|
||||
await APIClient.sendMessage(widget.value.userID, widget.value.userKey!, _ctrlMessage.text);
|
||||
Toaster.success("Success", 'Message sent');
|
||||
setState(() {
|
||||
_ctrlMessage.clear();
|
||||
});
|
||||
} catch (e, stackTrace) {
|
||||
Toaster.error("Error", 'Failed to send message: ${e.toString()}');
|
||||
ApplicationLog.error('Failed to send message', trace: stackTrace);
|
||||
|
||||
Reference in New Issue
Block a user