mirror of
https://github.com/Qz3rK/tdesktop.git
synced 2026-07-03 14:15:08 +02:00
Update API scheme to layer 143.
This commit is contained in:
@@ -75,7 +75,7 @@ struct PreparedFile {
|
||||
|
||||
QString path;
|
||||
QByteArray content;
|
||||
int size = 0;
|
||||
int64 size = 0;
|
||||
std::unique_ptr<Ui::PreparedFileInformation> information;
|
||||
QImage preview;
|
||||
QSize shownDimensions;
|
||||
@@ -91,6 +91,7 @@ struct PreparedList {
|
||||
Directory,
|
||||
EmptyFile,
|
||||
TooLargeFile,
|
||||
PremiumRequired,
|
||||
};
|
||||
|
||||
PreparedList() = default;
|
||||
|
||||
@@ -502,7 +502,7 @@ Storage::Cache::Key StorageFileLocation::bigFileBaseCacheKey() const {
|
||||
| (_id >> 48);
|
||||
const auto low = (_id << 16);
|
||||
|
||||
Ensures((low & 0xFFULL) == 0);
|
||||
Ensures((low & 0x1FFULL) == 0);
|
||||
return Storage::Cache::Key{ high, low };
|
||||
}
|
||||
|
||||
|
||||
@@ -310,7 +310,7 @@ ImageLocation FromWebDocument(const MTPWebDocument &document) {
|
||||
// We don't use size from WebDocument, because it is not reliable.
|
||||
// It can be > 0 and different from the real size
|
||||
// that we get in upload.WebFile result.
|
||||
//auto filesize = 0; // data.vsize().v;
|
||||
//auto filesize = int64(); // data.vsize().v;
|
||||
return ImageLocation(
|
||||
DownloadLocation{ WebFileLocation(
|
||||
data.vurl().v,
|
||||
@@ -323,7 +323,7 @@ ImageLocation FromWebDocument(const MTPWebDocument &document) {
|
||||
// We don't use size from WebDocument, because it is not reliable.
|
||||
// It can be > 0 and different from the real size
|
||||
// that we get in upload.WebFile result.
|
||||
//auto filesize = 0; // data.vsize().v;
|
||||
//auto filesize = int64(); // data.vsize().v;
|
||||
return ImageLocation(
|
||||
DownloadLocation{ PlainUrlLocation{ qs(data.vurl()) } },
|
||||
size.width(),
|
||||
|
||||
@@ -9,9 +9,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
|
||||
namespace Ui {
|
||||
|
||||
inline constexpr auto FileStatusSizeReady = 0x7FFFFFF0;
|
||||
inline constexpr auto FileStatusSizeLoaded = 0x7FFFFFF1;
|
||||
inline constexpr auto FileStatusSizeFailed = 0x7FFFFFF2;
|
||||
inline constexpr auto FileStatusSizeReady = 0xFFFFFFF0LL;
|
||||
inline constexpr auto FileStatusSizeLoaded = 0xFFFFFFF1LL;
|
||||
inline constexpr auto FileStatusSizeFailed = 0xFFFFFFF2LL;
|
||||
|
||||
[[nodiscard]] QString FormatSizeText(qint64 size);
|
||||
[[nodiscard]] QString FormatDownloadText(qint64 ready, qint64 total);
|
||||
|
||||
Reference in New Issue
Block a user