[Improvement] Do not hide "mark as read" under Alt+Shift modfiers
This commit is contained in:
parent
c62782b8c5
commit
2e0bcb1ead
1 changed files with 6 additions and 18 deletions
|
|
@ -678,33 +678,21 @@ void SetupAccountsWrap(
|
||||||
}
|
}
|
||||||
const auto addAction = Ui::Menu::CreateAddActionCallback(
|
const auto addAction = Ui::Menu::CreateAddActionCallback(
|
||||||
state->menu);
|
state->menu);
|
||||||
if (!state->menu && IsAltShift(raw->clickModifiers()) && !locked) {
|
|
||||||
state->menu = base::make_unique_q<Ui::PopupMenu>(
|
|
||||||
raw,
|
|
||||||
st::popupMenuWithIcons);
|
|
||||||
Window::MenuAddMarkAsReadAllChatsAction(window, addAction);
|
|
||||||
state->menu->popup(QCursor::pos());
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (&session->account() == &Core::App().activeAccount()
|
|
||||||
|| state->menu) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
state->menu = base::make_unique_q<Ui::PopupMenu>(
|
state->menu = base::make_unique_q<Ui::PopupMenu>(
|
||||||
raw,
|
raw,
|
||||||
st::popupMenuWithIcons);
|
st::popupMenuWithIcons);
|
||||||
|
if (&session->account() != &Core::App().activeAccount()) {
|
||||||
|
addAction(tr::lng_menu_activate(tr::now), [=] {
|
||||||
|
Core::App().domain().activate(&session->account());
|
||||||
|
}, &st::menuIconProfile);
|
||||||
|
}
|
||||||
|
|
||||||
addAction(tr::lng_profile_copy_phone(tr::now), [=] {
|
addAction(tr::lng_profile_copy_phone(tr::now), [=] {
|
||||||
const auto phone = rpl::variable<TextWithEntities>(
|
const auto phone = rpl::variable<TextWithEntities>(
|
||||||
Info::Profile::PhoneValue(session->user()));
|
Info::Profile::PhoneValue(session->user()));
|
||||||
QGuiApplication::clipboard()->setText(phone.current().text);
|
QGuiApplication::clipboard()->setText(phone.current().text);
|
||||||
}, &st::menuIconCopy);
|
}, &st::menuIconCopy);
|
||||||
|
|
||||||
if (!locked) {
|
|
||||||
addAction(tr::lng_menu_activate(tr::now), [=] {
|
|
||||||
Core::App().domain().activate(&session->account());
|
|
||||||
}, &st::menuIconProfile);
|
|
||||||
}
|
|
||||||
|
|
||||||
auto logoutCallback = [=] {
|
auto logoutCallback = [=] {
|
||||||
const auto callback = [=](Fn<void()> &&close) {
|
const auto callback = [=](Fn<void()> &&close) {
|
||||||
close();
|
close();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue