Fix crash that could occur if closing the usercard quickly after blocking (#4711)

* Specifically, this adds a caller to the network request, which makes the
success or failure callback not fire.
This has the unintended consequence of the block list not reloading if
the usercard is closed, but it's not a big concern.

* Add unrelated `-DUSE_ALTERNATE_LINKER` cmake option

From https://github.com/heavyai/heavydb/blob/0517d99b467806f6af7b4c969e351368a667497d/CMakeLists.txt#L87-L103
This commit is contained in:
pajlada
2023-07-01 14:01:47 +02:00
committed by GitHub
parent 2f272b37ca
commit d2f1516818
9 changed files with 52 additions and 18 deletions
@@ -650,7 +650,7 @@ void CommandController::initialize(Settings &, Paths &paths)
target,
[currentUser, channel, target](const HelixUser &targetUser) {
getApp()->accounts->twitch.getCurrent()->blockUser(
targetUser.id,
targetUser.id, nullptr,
[channel, target, targetUser] {
channel->addMessage(makeSystemMessage(
QString("You successfully blocked user %1")
@@ -703,7 +703,7 @@ void CommandController::initialize(Settings &, Paths &paths)
target,
[currentUser, channel, target](const auto &targetUser) {
getApp()->accounts->twitch.getCurrent()->unblockUser(
targetUser.id,
targetUser.id, nullptr,
[channel, target, targetUser] {
channel->addMessage(makeSystemMessage(
QString("You successfully unblocked user %1")