mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Moved producer of state description to CloudBlob.
This commit is contained in:
@@ -17,7 +17,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "ui/emoji_config.h"
|
||||
#include "lang/lang_keys.h"
|
||||
#include "base/zlib_help.h"
|
||||
#include "layout.h"
|
||||
#include "core/application.h"
|
||||
#include "main/main_account.h"
|
||||
#include "mainwidget.h"
|
||||
@@ -149,25 +148,9 @@ SetState ComputeState(int id) {
|
||||
}
|
||||
|
||||
QString StateDescription(const SetState &state) {
|
||||
return state.match([](const Available &data) {
|
||||
return tr::lng_emoji_set_download(tr::now, lt_size, formatSizeText(data.size));
|
||||
}, [](const Ready &data) -> QString {
|
||||
return tr::lng_emoji_set_ready(tr::now);
|
||||
}, [](const Active &data) -> QString {
|
||||
return tr::lng_emoji_set_active(tr::now);
|
||||
}, [](const Loading &data) {
|
||||
const auto percent = (data.size > 0)
|
||||
? snap((data.already * 100) / float64(data.size), 0., 100.)
|
||||
: 0.;
|
||||
return tr::lng_emoji_set_loading(
|
||||
tr::now,
|
||||
lt_percent,
|
||||
QString::number(int(std::round(percent))) + '%',
|
||||
lt_progress,
|
||||
formatDownloadText(data.already, data.size));
|
||||
}, [](const Failed &data) {
|
||||
return tr::lng_attach_failed(tr::now);
|
||||
});
|
||||
return StateDescription(
|
||||
state,
|
||||
tr::lng_emoji_set_active);
|
||||
}
|
||||
|
||||
bool GoodSetPartName(const QString &name) {
|
||||
|
Reference in New Issue
Block a user