Cockatrice/cockatrice/src/interface/widgets
BruebachL 765ebf8fb1
[UserList] Context menu invite (#7138)
* [Client] Send game invites from the user context menu via a private message

The user context menu gains an "Invite to Game" submenu listing the
inviteable games in the room (the inviter's own games, honoring the
buddy-only setting). Picking one opens a private message to the target
user with a cockatrice://joingame link naming the game, so the target
gets a clickable invite instead of a raw URL. Multi-game rooms offer a
picker; a single inviteable game sends directly. Sending a message to
an offline user no longer swallows the draft — it reports that the
user is offline and keeps the typed text.

Took 50 seconds


Took 3 minutes

* [Client] Extract sendPrivateMessage() to fix invite message draft overwrite

sendInviteMessage() was calling sayEdit->setText(text) then sendMessage(),
which overwrites any text the user had typed.  Extract the command-building
and sending logic into a new sendPrivateMessage(const QString &text) method
that takes the text directly.  sendMessage() now calls it after its guards
and clears sayEdit; sendInviteMessage() calls it directly without touching
the input field at all.

Took 33 minutes

* Rename method, address comments.

Took 5 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-08-17 10:49:19 +02:00
..
cards [CardSearch] Add card completion popups to chats and search fields (#7089) 2026-08-11 18:50:30 +02:00
deck_analytics [CI] Remove Qt5 (#7071) 2026-08-08 22:04:50 +02:00
deck_editor [DeckEditor] Use CommanderSpellbook.com to estimate bracket if format is 'commander' (#6415) 2026-08-09 00:46:17 +02:00
dialogs [GamesModel] Rename 'Creator' column to 'Host' (#7083) 2026-08-13 18:58:21 +02:00
general [Settings] Shuffle some settings around (#7084) 2026-08-08 22:27:41 +02:00
menus [Settings] Shuffle some settings around (#7084) 2026-08-08 22:27:41 +02:00
printing_selector [CI] Remove Qt5 (#7071) 2026-08-08 22:04:50 +02:00
quick_settings [CI] Remove Qt5 (#7071) 2026-08-08 22:04:50 +02:00
replay [Replay] Implement option to skip empty sections (#7069) 2026-08-08 23:12:10 -07:00
server [UserList] Context menu invite (#7138) 2026-08-17 10:49:19 +02:00
settings_page [Tabs] Add a setting to define startup tab on application launch (#7121) 2026-08-15 22:16:37 +02:00
tabs [UserList] Context menu invite (#7138) 2026-08-17 10:49:19 +02:00
utility [CardSearch] Add card completion popups to chats and search fields (#7089) 2026-08-11 18:50:30 +02:00
visual_database_display [VDD] Defer heavy construction until after the tab paints (#7115) 2026-08-14 11:39:10 +02:00
visual_deck_editor [DeckEditor] Reuse the inherited CardDatabaseModel in the visual editor (#7112) 2026-08-14 07:11:26 +02:00
visual_deck_storage [Refactor] Decouple DeckFilterString from DeckPreviewWidget (#7104) 2026-08-13 19:04:16 +02:00