fix pin message flow
This commit is contained in:
@@ -366,13 +366,13 @@ class _MessageActionsModalState extends State<MessageActionsModal> {
|
|||||||
void _togglePin() async {
|
void _togglePin() async {
|
||||||
final channel = StreamChannel.of(context).channel;
|
final channel = StreamChannel.of(context).channel;
|
||||||
|
|
||||||
|
Navigator.pop(context);
|
||||||
try {
|
try {
|
||||||
if (!widget.message.pinned) {
|
if (!widget.message.pinned) {
|
||||||
await channel.pinMessage(widget.message);
|
await channel.pinMessage(widget.message);
|
||||||
} else {
|
} else {
|
||||||
await channel.unpinMessage(widget.message);
|
await channel.unpinMessage(widget.message);
|
||||||
}
|
}
|
||||||
Navigator.pop(context);
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
_showErrorAlert();
|
_showErrorAlert();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user