Remove BackgroundType::is_server.

This commit is contained in:
levlam 2021-06-09 19:19:48 +03:00
parent 5188a5b5e7
commit 4a35b3e621
2 changed files with 1 additions and 4 deletions

View File

@ -363,7 +363,7 @@ Result<string> BackgroundManager::get_background_url(const string &name,
TRY_RESULT(type, get_background_type(background_type.get()));
auto url = PSTRING() << G()->shared_config().get_option_string("t_me_url", "https://t.me/") << "bg/";
auto link = type.get_link();
if (type.is_server()) {
if (type.has_file()) {
url += name;
if (!link.empty()) {
url += '?';

View File

@ -75,9 +75,6 @@ struct BackgroundType {
explicit BackgroundType(BackgroundFill fill) : type(Type::Fill), fill(fill) {
}
bool is_server() const {
return type == Type::Wallpaper || type == Type::Pattern;
}
bool has_file() const {
return type == Type::Wallpaper || type == Type::Pattern;
}