2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

started media redesign (does not compile!)

This commit is contained in:
John Preston
2015-12-08 22:07:50 +03:00
parent 0b96dd5362
commit 6bad3b4d7e
12 changed files with 575 additions and 436 deletions

View File

@@ -1654,7 +1654,10 @@ void MainWidget::onDownloadPathSettings() {
void MainWidget::videoLoadFailed(mtpFileLoader *loader, bool started) {
loadFailed(loader, started, SLOT(videoLoadRetry()));
VideoData *video = App::video(loader->objId());
if (video && video->loader) video->finish();
if (video) {
if (video->loader) video->finish();
video->status = FileDownloadFailed;
}
}
void MainWidget::videoLoadRetry() {
@@ -1811,7 +1814,7 @@ void MainWidget::audioLoadFailed(mtpFileLoader *loader, bool started) {
loadFailed(loader, started, SLOT(audioLoadRetry()));
AudioData *audio = App::audio(loader->objId());
if (audio) {
audio->status = FileFailed;
audio->status = FileDownloadFailed;
if (audio->loader) audio->finish();
}
}
@@ -1907,7 +1910,7 @@ void MainWidget::documentLoadFailed(mtpFileLoader *loader, bool started) {
DocumentData *document = App::document(loader->objId());
if (document) {
if (document->loader) document->finish();
document->status = FileFailed;
document->status = FileDownloadFailed;
}
}