mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-22 17:45:09 -07:00
[DeckShare] Abandon an in-flight tree share on cancel
Leaving share mode never stopped the timeout timer, and a late response still ran shareFromTreeFinished, copying the link and announcing success for a share the user backed out of. Stopping the timer and tracking the outstanding request by sequence number means a stale reply (or a timed-out one) after cancel is ignored, and cancelling + re-entering share mode can no longer confuse the two requests.
This commit is contained in:
parent
ffa3971e90
commit
02f2f20356
2 changed files with 20 additions and 1 deletions
|
|
@ -39,6 +39,8 @@ private:
|
|||
QGroupBox *leftGroupBox, *rightGroupBox;
|
||||
ShareBarWidget *shareBar;
|
||||
QTimer *shareTimeoutTimer;
|
||||
int shareRequestSeq = 0;
|
||||
int shareInFlightSeq = 0;
|
||||
|
||||
QAction *aOpenLocalDeck, *aRenameLocal, *aUpload, *aNewLocalFolder, *aDeleteLocalDeck;
|
||||
QAction *aOpenDecksFolder;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue