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

First working code for sending albums.

This commit is contained in:
John Preston
2017-12-19 20:57:42 +04:00
parent 711aa51046
commit 3b3a705a67
30 changed files with 1789 additions and 731 deletions

View File

@@ -44,12 +44,13 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
namespace Local {
namespace {
constexpr int kThemeFileSizeLimit = 5 * 1024 * 1024;
constexpr auto kThemeFileSizeLimit = 5 * 1024 * 1024;
constexpr auto kFileLoaderQueueStopTimeout = TimeMs(5000);
using FileKey = quint64;
constexpr char tdfMagic[] = { 'T', 'D', 'F', '$' };
constexpr int tdfMagicLen = sizeof(tdfMagic);
constexpr auto tdfMagicLen = int(sizeof(tdfMagic));
QString toFilePart(FileKey val) {
QString result;
@@ -2273,7 +2274,7 @@ void start() {
Expects(!_manager);
_manager = new internal::Manager();
_localLoader = new TaskQueue(0, FileLoaderQueueStopTimeout);
_localLoader = new TaskQueue(kFileLoaderQueueStopTimeout);
_basePath = cWorkingDir() + qsl("tdata/");
if (!QDir().exists(_basePath)) QDir().mkpath(_basePath);