File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -49,13 +49,24 @@ class _PollWidgetState extends State<PollWidget> {
49
49
}
50
50
51
51
void _toggleVote (PollOption option) async {
52
+ final navigator = Navigator .of (context);
53
+
54
+ unawaited (showDialog (context: context,
55
+ barrierDismissible: false ,
56
+ builder: (_) {
57
+ return Center (child: CircularProgressIndicator ());
58
+ }
59
+ ));
60
+
52
61
final store = PerAccountStoreWidget .of (context);
53
62
final op = option.voters.contains (store.selfUserId)
54
63
? PollVoteOp .remove
55
64
: PollVoteOp .add;
56
- unawaited (sendSubmessage (store.connection, messageId: widget.messageId,
65
+ await (sendSubmessage (store.connection, messageId: widget.messageId,
57
66
submessageType: SubmessageType .widget,
58
67
content: PollVoteEventSubmessage (key: option.key, op: op)));
68
+
69
+ navigator.pop ();
59
70
}
60
71
61
72
@override
You can’t perform that action at this time.
0 commit comments