mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
Allow topic deletion.
This commit is contained in:
@@ -112,7 +112,7 @@ MuteItem::MuteItem(
|
||||
st::defaultPopupMenu.showDuration);
|
||||
}, lifetime());
|
||||
|
||||
const auto weak = base::make_weak(thread.get());
|
||||
const auto weak = base::make_weak(thread);
|
||||
setClickedCallback([=] {
|
||||
if (const auto strong = weak.get()) {
|
||||
strong->owner().notifySettings().update(
|
||||
@@ -161,7 +161,7 @@ void MuteBox(not_null<Ui::GenericBox*> box, not_null<Data::Thread*> thread) {
|
||||
: tr::lng_mute_menu_mute();
|
||||
}) | rpl::flatten_latest();
|
||||
|
||||
const auto weak = base::make_weak(thread.get());
|
||||
const auto weak = base::make_weak(thread);
|
||||
Ui::ConfirmBox(box, {
|
||||
.confirmed = [=] {
|
||||
if (const auto strong = weak.get()) {
|
||||
@@ -191,7 +191,7 @@ void PickMuteBox(
|
||||
|
||||
const auto pickerCallback = TimePickerBox(box, seconds, phrases, 0);
|
||||
|
||||
const auto weak = base::make_weak(thread.get());
|
||||
const auto weak = base::make_weak(thread);
|
||||
Ui::ConfirmBox(box, {
|
||||
.confirmed = [=] {
|
||||
const auto muteFor = pickerCallback();
|
||||
@@ -240,7 +240,7 @@ void FillMuteMenu(
|
||||
not_null<Ui::PopupMenu*> menu,
|
||||
not_null<Data::Thread*> thread,
|
||||
std::shared_ptr<Ui::Show> show) {
|
||||
const auto weak = base::make_weak(thread.get());
|
||||
const auto weak = base::make_weak(thread);
|
||||
const auto with = [=](Fn<void(not_null<Data::Thread*> thread)> handler) {
|
||||
return [=] {
|
||||
if (const auto strong = weak.get()) {
|
||||
|
@@ -225,7 +225,7 @@ void SetupUnreadMentionsMenu(
|
||||
const auto sendRequest = [=](
|
||||
not_null<Data::Thread*> thread,
|
||||
Fn<void()> done) {
|
||||
sendOne(base::make_weak(thread.get()), std::move(done), sendOne);
|
||||
sendOne(base::make_weak(thread), std::move(done), sendOne);
|
||||
};
|
||||
SetupReadAllMenu(button, currentThread, text, sendRequest);
|
||||
}
|
||||
@@ -266,7 +266,7 @@ void SetupUnreadReactionsMenu(
|
||||
const auto sendRequest = [=](
|
||||
not_null<Data::Thread*> thread,
|
||||
Fn<void()> done) {
|
||||
sendOne(base::make_weak(thread.get()), std::move(done), sendOne);
|
||||
sendOne(base::make_weak(thread), std::move(done), sendOne);
|
||||
};
|
||||
SetupReadAllMenu(button, currentThread, text, sendRequest);
|
||||
}
|
||||
|
Reference in New Issue
Block a user