mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-08-04 11:00:46 +00:00
Use base::weak_qptr / base::make_weak.
This commit is contained in:
@@ -1022,14 +1022,14 @@ void SessionNavigation::applyBoost(
|
||||
}
|
||||
done({});
|
||||
} else {
|
||||
const auto weak = std::make_shared<QPointer<Ui::BoxContent>>();
|
||||
const auto weak = std::make_shared<base::weak_qptr<Ui::BoxContent>>();
|
||||
const auto reassign = [=](
|
||||
std::vector<int> slots,
|
||||
int groups,
|
||||
int channels) {
|
||||
const auto count = int(slots.size());
|
||||
const auto callback = [=](Ui::BoostCounters counters) {
|
||||
if (const auto strong = weak->data()) {
|
||||
if (const auto strong = weak->get()) {
|
||||
strong->closeBox();
|
||||
}
|
||||
done(counters);
|
||||
@@ -2934,7 +2934,7 @@ auto SessionController::stickerOrEmojiChosen() const
|
||||
return _stickerOrEmojiChosen.events();
|
||||
}
|
||||
|
||||
QPointer<Ui::BoxContent> SessionController::show(
|
||||
base::weak_qptr<Ui::BoxContent> SessionController::show(
|
||||
object_ptr<Ui::BoxContent> content,
|
||||
Ui::LayerOptions options,
|
||||
anim::type animated) {
|
||||
|
||||
Reference in New Issue
Block a user