mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-14 21:27:07 +02:00
fix: use custom icon for edits history action
fix: remove buggy Hide
This commit is contained in:
parent
6fab4e1dc3
commit
9cc0ca5d81
5 changed files with 14 additions and 14 deletions
BIN
Telegram/Resources/icons/ayu/edits_history.png
Normal file
BIN
Telegram/Resources/icons/ayu/edits_history.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 428 B |
BIN
Telegram/Resources/icons/ayu/edits_history@2x.png
Normal file
BIN
Telegram/Resources/icons/ayu/edits_history@2x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 713 B |
BIN
Telegram/Resources/icons/ayu/edits_history@3x.png
Normal file
BIN
Telegram/Resources/icons/ayu/edits_history@3x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1,005 B |
|
@ -12,6 +12,7 @@ using "ui/widgets/widgets.style";
|
|||
|
||||
ayuGhostIcon: icon {{ "ayu/ghost", menuIconColor }};
|
||||
ayuMenuIcon: icon {{ "ayu/ayu_menu", menuIconColor }};
|
||||
ayuEditsHistoryIcon: icon {{ "ayu/edits_history", menuIconColor }};
|
||||
ayuLReadMenuIcon: icon {{ "ayu/lread", menuIconColor }};
|
||||
ayuSReadMenuIcon: icon {{ "ayu/sread", menuIconColor }};
|
||||
ayuStreamerModeMenuIcon: icon {{ "ayu/streamer", menuIconColor }};
|
||||
|
|
|
@ -10,9 +10,7 @@
|
|||
#include "ayu/messages/ayu_messages_controller.h"
|
||||
#include "ayu/ui/boxes/message_history_box.h"
|
||||
|
||||
#include "history/history_inner_widget.h"
|
||||
#include "settings/settings_common.h"
|
||||
#include "styles/style_chat.h"
|
||||
#include "styles/style_ayu_icons.h"
|
||||
#include "ui/widgets/popup_menu.h"
|
||||
|
||||
#include "ayu/ui/sections/edited/edited_log_section.h"
|
||||
|
@ -29,22 +27,23 @@ void AddHistoryAction(not_null<Ui::PopupMenu *> menu, HistoryItem *item)
|
|||
{
|
||||
item->history()->session().tryResolveWindow()
|
||||
->showSection(std::make_shared<EditedLog::SectionMemento>(item->history()->peer, item));
|
||||
}, &st::menuIconInfo);
|
||||
}, &st::ayuEditsHistoryIcon);
|
||||
}
|
||||
}
|
||||
|
||||
void AddHideMessageAction(not_null<Ui::PopupMenu *> menu, HistoryItem *item)
|
||||
{
|
||||
const auto settings = &AyuSettings::getInstance();
|
||||
const auto history = item->history();
|
||||
menu->addAction(tr::ayu_ContextHideMessage(tr::now), [=]()
|
||||
{
|
||||
const auto initSaveDeleted = settings->saveDeletedMessages;
|
||||
|
||||
settings->set_saveDeletedMessages(false);
|
||||
history->destroyMessage(item);
|
||||
settings->set_saveDeletedMessages(initSaveDeleted);
|
||||
}, &st::menuIconClear);
|
||||
// todo: rework
|
||||
// const auto settings = &AyuSettings::getInstance();
|
||||
// const auto history = item->history();
|
||||
// menu->addAction(tr::ayu_ContextHideMessage(tr::now), [=]()
|
||||
// {
|
||||
// const auto initSaveDeleted = settings->saveDeletedMessages;
|
||||
//
|
||||
// settings->set_saveDeletedMessages(false);
|
||||
// history->destroyMessage(item);
|
||||
// settings->set_saveDeletedMessages(initSaveDeleted);
|
||||
// }, &st::menuIconClear);
|
||||
}
|
||||
|
||||
void AddReadUntilAction(not_null<Ui::PopupMenu *> menu, HistoryItem *item)
|
||||
|
|
Loading…
Add table
Reference in a new issue