mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 06:07:06 +02:00
Fixed ability to mark as read all chats for wrong account.
This commit is contained in:
parent
aa1f8cfb8f
commit
80a1e6ecf3
3 changed files with 8 additions and 5 deletions
|
@ -751,7 +751,8 @@ void SetupAccountsWrap(
|
|||
raw,
|
||||
st::popupMenuWithIcons);
|
||||
Window::MenuAddMarkAsReadAllChatsAction(
|
||||
window,
|
||||
session,
|
||||
window->uiShow(),
|
||||
Ui::Menu::CreateAddActionCallback(state->menu));
|
||||
state->menu->popup(QCursor::pos());
|
||||
return;
|
||||
|
|
|
@ -2767,10 +2767,11 @@ void UnpinAllMessages(
|
|||
}
|
||||
|
||||
void MenuAddMarkAsReadAllChatsAction(
|
||||
not_null<Window::SessionController*> controller,
|
||||
not_null<Main::Session*> session,
|
||||
std::shared_ptr<Ui::Show> show,
|
||||
const PeerMenuCallback &addAction) {
|
||||
// There is no async to make weak from controller.
|
||||
auto callback = [=, owner = &controller->session().data()] {
|
||||
auto callback = [=, owner = &session->data()] {
|
||||
auto boxCallback = [=](Fn<void()> &&close) {
|
||||
close();
|
||||
|
||||
|
@ -2779,7 +2780,7 @@ void MenuAddMarkAsReadAllChatsAction(
|
|||
MarkAsReadChatList(folder->chatsList());
|
||||
}
|
||||
};
|
||||
controller->show(
|
||||
show->show(
|
||||
Ui::MakeConfirmBox({
|
||||
tr::lng_context_mark_read_all_sure(),
|
||||
std::move(boxCallback)
|
||||
|
|
|
@ -74,7 +74,8 @@ void FillSenderUserpicMenu(
|
|||
const PeerMenuCallback &addAction);
|
||||
|
||||
void MenuAddMarkAsReadAllChatsAction(
|
||||
not_null<Window::SessionController*> controller,
|
||||
not_null<Main::Session*> session,
|
||||
std::shared_ptr<Ui::Show> show,
|
||||
const PeerMenuCallback &addAction);
|
||||
|
||||
void MenuAddMarkAsReadChatListAction(
|
||||
|
|
Loading…
Add table
Reference in a new issue