mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
disabled libexif usage, mediaview showing gif/mp4 through ClipReader
This commit is contained in:
@@ -95,6 +95,18 @@ namespace Ui {
|
||||
return false;
|
||||
}
|
||||
|
||||
void clipRedraw(ClipReader *reader) {
|
||||
const GifItems &items(App::gifItems());
|
||||
GifItems::const_iterator it = items.constFind(reader);
|
||||
if (it != items.cend()) {
|
||||
if (reader->currentDisplayed()) {
|
||||
return;
|
||||
}
|
||||
Ui::redrawHistoryItem(it.value());
|
||||
}
|
||||
if (Window *w = App::wnd()) w->ui_clipRedraw(reader);
|
||||
}
|
||||
|
||||
void redrawHistoryItem(const HistoryItem *item) {
|
||||
if (MainWidget *m = App::main()) m->ui_redrawHistoryItem(item);
|
||||
}
|
||||
@@ -129,6 +141,23 @@ namespace Notify {
|
||||
if (MainWidget *m = App::main()) m->notify_migrateUpdated(peer);
|
||||
}
|
||||
|
||||
void clipReinit(ClipReader *reader) {
|
||||
const GifItems &items(App::gifItems());
|
||||
GifItems::const_iterator it = items.constFind(reader);
|
||||
if (it != items.cend()) {
|
||||
HistoryItem *item = it.value();
|
||||
|
||||
item->initDimensions(); // can delete reader and items entry it
|
||||
Notify::historyItemResized(item, true);
|
||||
Notify::historyItemLayoutChanged(item);
|
||||
}
|
||||
if (Window *w = App::wnd()) w->notify_clipReinit(reader);
|
||||
}
|
||||
|
||||
void historyItemResized(const HistoryItem *item, bool scrollToIt) {
|
||||
if (MainWidget *m = App::main()) m->notify_historyItemResized(item, scrollToIt);
|
||||
}
|
||||
|
||||
void historyItemLayoutChanged(const HistoryItem *item) {
|
||||
if (MainWidget *m = App::main()) m->notify_historyItemLayoutChanged(item);
|
||||
}
|
||||
|
Reference in New Issue
Block a user