2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

disabled libexif usage, mediaview showing gif/mp4 through ClipReader

This commit is contained in:
John Preston
2015-12-22 11:01:02 +03:00
parent 0fd6f04aa9
commit 62723f7576
20 changed files with 267 additions and 418 deletions

View File

@@ -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);
}