mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Update API scheme to layer 143.
This commit is contained in:
@@ -144,23 +144,27 @@ protected:
|
||||
class StatusText {
|
||||
public:
|
||||
// duration = -1 - no duration, duration = -2 - "GIF" duration
|
||||
void update(int newSize, int fullSize, int duration, crl::time realDuration);
|
||||
void setSize(int newSize);
|
||||
void update(
|
||||
int64 newSize,
|
||||
int64 fullSize,
|
||||
TimeId duration,
|
||||
TimeId realDuration);
|
||||
void setSize(int64 newSize);
|
||||
|
||||
int size() const {
|
||||
[[nodiscard]] int64 size() const {
|
||||
return _size;
|
||||
}
|
||||
QString text() const {
|
||||
[[nodiscard]] QString text() const {
|
||||
return _text;
|
||||
}
|
||||
|
||||
private:
|
||||
// >= 0 will contain download / upload string, _size = loaded bytes
|
||||
// < 0 will contain played string, _size = -(seconds + 1) played
|
||||
// 0x7FFFFFF0 will contain status for not yet downloaded file
|
||||
// 0x7FFFFFF1 will contain status for already downloaded file
|
||||
// 0x7FFFFFF2 will contain status for failed to download / upload file
|
||||
int _size = 0;
|
||||
// 0xFFFFFFF0LL will contain status for not yet downloaded file
|
||||
// 0xFFFFFFF1LL will contain status for already downloaded file
|
||||
// 0xFFFFFFF2LL will contain status for failed to download / upload file
|
||||
int64 _size = 0;
|
||||
QString _text;
|
||||
|
||||
};
|
||||
@@ -328,7 +332,7 @@ private:
|
||||
const style::OverviewFileLayout &_st;
|
||||
|
||||
Ui::Text::String _name, _details;
|
||||
int _nameVersion;
|
||||
int _nameVersion = 0;
|
||||
|
||||
void updateName();
|
||||
bool updateStatusText();
|
||||
@@ -387,8 +391,9 @@ private:
|
||||
|
||||
Ui::Text::String _name;
|
||||
QString _date, _ext;
|
||||
int32 _datew, _extw;
|
||||
int32 _thumbw;
|
||||
int _datew = 0;
|
||||
int _extw = 0;
|
||||
int _thumbw = 0;
|
||||
|
||||
bool withThumb() const;
|
||||
bool updateStatusText();
|
||||
|
Reference in New Issue
Block a user