mirror of https://github.com/procxx/kepka.git
Fix crash in forwarding box.
This commit is contained in:
parent
776dd8b928
commit
03b0c0cff4
|
@ -910,7 +910,12 @@ void ChooseRecipientBoxController::prepareViewHook() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChooseRecipientBoxController::rowClicked(not_null<PeerListRow*> row) {
|
void ChooseRecipientBoxController::rowClicked(not_null<PeerListRow*> row) {
|
||||||
_callback(row->peer());
|
auto weak = base::make_weak(this);
|
||||||
|
auto callback = std::move(_callback);
|
||||||
|
callback(row->peer());
|
||||||
|
if (weak) {
|
||||||
|
_callback = std::move(callback);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto ChooseRecipientBoxController::createRow(
|
auto ChooseRecipientBoxController::createRow(
|
||||||
|
|
|
@ -198,7 +198,9 @@ private:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class AddBotToGroupBoxController : public ChatsListBoxController, public base::has_weak_ptr {
|
class AddBotToGroupBoxController
|
||||||
|
: public ChatsListBoxController
|
||||||
|
, public base::has_weak_ptr {
|
||||||
public:
|
public:
|
||||||
static void Start(not_null<UserData*> bot);
|
static void Start(not_null<UserData*> bot);
|
||||||
|
|
||||||
|
@ -227,7 +229,9 @@ private:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class ChooseRecipientBoxController : public ChatsListBoxController {
|
class ChooseRecipientBoxController
|
||||||
|
: public ChatsListBoxController
|
||||||
|
, public base::has_weak_ptr {
|
||||||
public:
|
public:
|
||||||
ChooseRecipientBoxController(
|
ChooseRecipientBoxController(
|
||||||
FnMut<void(not_null<PeerData*>)> callback);
|
FnMut<void(not_null<PeerData*>)> callback);
|
||||||
|
|
Loading…
Reference in New Issue