mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
Moved countries from Data to Countries namespace.
This commit is contained in:
@@ -23,7 +23,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "ui/countryinput.h"
|
||||
#include "ui/text/format_values.h"
|
||||
#include "core/update_checker.h"
|
||||
#include "data/data_countries.h"
|
||||
#include "countries/countries_instance.h"
|
||||
#include "styles/style_layers.h"
|
||||
|
||||
namespace Passport {
|
||||
@@ -123,7 +123,7 @@ EditDocumentScheme GetDocumentScheme(
|
||||
using ValueClass = Scheme::ValueClass;
|
||||
const auto DontFormat = nullptr;
|
||||
const auto CountryFormat = [](const QString &value) {
|
||||
const auto result = Data::CountryNameByISO2(value);
|
||||
const auto result = Countries::CountryNameByISO2(value);
|
||||
return result.isEmpty() ? value : result;
|
||||
};
|
||||
const auto GenderFormat = [](const QString &value) {
|
||||
@@ -322,7 +322,7 @@ EditDocumentScheme GetDocumentScheme(
|
||||
if (!language.isEmpty()) {
|
||||
return tr::lng_passport_native_name_language_about(tr::now);
|
||||
}
|
||||
const auto name = Data::CountryNameByISO2(countryCode);
|
||||
const auto name = Countries::CountryNameByISO2(countryCode);
|
||||
Assert(!name.isEmpty());
|
||||
return tr::lng_passport_native_name_about(
|
||||
tr::now,
|
||||
|
@@ -19,7 +19,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "ui/wrap/vertical_layout.h"
|
||||
#include "ui/wrap/fade_wrap.h"
|
||||
#include "ui/wrap/slide_wrap.h"
|
||||
#include "data/data_countries.h"
|
||||
#include "countries/countries_instance.h"
|
||||
#include "data/data_user.h" // ->bot()->session()
|
||||
#include "main/main_session.h" // ->session().user()
|
||||
#include "ui/text/text_utilities.h" // Ui::Text::ToUpper
|
||||
@@ -520,7 +520,7 @@ void PanelEditDocument::createDetailsRow(
|
||||
object_ptr<Ui::BoxContent> box) {
|
||||
controller->show(std::move(box));
|
||||
};
|
||||
const auto isoByPhone = Data::CountryISO2ByPhone(
|
||||
const auto isoByPhone = Countries::CountryISO2ByPhone(
|
||||
_controller->bot()->session().user()->phone());
|
||||
|
||||
const auto [it, ok] = _details.emplace(
|
||||
|
@@ -16,7 +16,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "ui/wrap/slide_wrap.h"
|
||||
#include "ui/layers/box_content.h"
|
||||
#include "ui/boxes/country_select_box.h"
|
||||
#include "data/data_countries.h"
|
||||
#include "countries/countries_instance.h"
|
||||
#include "styles/style_layers.h"
|
||||
#include "styles/style_passport.h"
|
||||
|
||||
@@ -304,7 +304,7 @@ void AbstractTextRow<Input>::finishInnerAnimating() {
|
||||
}
|
||||
|
||||
QString CountryString(const QString &code) {
|
||||
const auto name = Data::CountryNameByISO2(code);
|
||||
const auto name = Countries::CountryNameByISO2(code);
|
||||
return name.isEmpty() ? tr::lng_passport_country_choose(tr::now) : name;
|
||||
}
|
||||
|
||||
@@ -383,7 +383,7 @@ void CountryRow::errorAnimationCallback() {
|
||||
|
||||
void CountryRow::chooseCountry() {
|
||||
const auto top = _value.current();
|
||||
const auto name = Data::CountryNameByISO2(top);
|
||||
const auto name = Countries::CountryNameByISO2(top);
|
||||
const auto country = !name.isEmpty()
|
||||
? top
|
||||
: !_defaultCountry.isEmpty()
|
||||
|
Reference in New Issue
Block a user