mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
parent
b27dc4ef8d
commit
2d354f8777
1 changed files with 17 additions and 0 deletions
|
@ -156,6 +156,18 @@ void AddPhotoActions(
|
|||
}
|
||||
}
|
||||
|
||||
void SaveGif(
|
||||
not_null<Window::SessionController*> controller,
|
||||
FullMsgId itemId) {
|
||||
if (const auto item = controller->session().data().message(itemId)) {
|
||||
if (const auto media = item->media()) {
|
||||
if (const auto document = media->document()) {
|
||||
Api::ToggleSavedGif(document, item->fullId(), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void OpenGif(
|
||||
not_null<Window::SessionController*> controller,
|
||||
FullMsgId itemId) {
|
||||
|
@ -227,6 +239,11 @@ void AddDocumentActions(
|
|||
OpenGif(list->controller(), contextId);
|
||||
});
|
||||
}
|
||||
if (document->isGifv()) {
|
||||
menu->addAction(tr::lng_context_save_gif(tr::now), [=] {
|
||||
SaveGif(list->controller(), contextId);
|
||||
});
|
||||
}
|
||||
}
|
||||
if (document->sticker() && document->sticker()->set) {
|
||||
menu->addAction(
|
||||
|
|
Loading…
Add table
Reference in a new issue