Selecting game already open in a tab brings user to that tab. (#4653)

* When trying to join a game from GameSelector that's already been joined by you, navigate to its game tab.

* return immediately, do not change button states

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
This commit is contained in:
Antoine Dahan 2022-10-29 09:46:50 -04:00 committed by GitHub
parent 8e4ddf366c
commit 72743e834e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 29 additions and 11 deletions

View file

@ -21,7 +21,7 @@ class UserContextMenu : public QObject
Q_OBJECT
private:
AbstractClient *client;
const TabSupervisor *tabSupervisor;
TabSupervisor *tabSupervisor;
TabGame *game;
QAction *aUserName;
@ -49,7 +49,7 @@ private slots:
void gamesOfUserReceived(const Response &resp, const CommandContainer &commandContainer);
public:
UserContextMenu(const TabSupervisor *_tabSupervisor, QWidget *_parent, TabGame *_game = 0);
UserContextMenu(TabSupervisor *_tabSupervisor, QWidget *_parent, TabGame *_game = 0);
void retranslateUi();
void showContextMenu(const QPoint &pos,
const QString &userName,