2
0
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:
23rd
2021-08-26 17:46:24 +03:00
parent 1b3075ac2e
commit df02bbb0a3
14 changed files with 41 additions and 41 deletions

View File

@@ -12,7 +12,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/text/format_values.h"
#include "ui/ui_utility.h"
#include "ui/special_fields.h"
#include "data/data_countries.h"
#include "countries/countries_instance.h"
#include "base/platform/base_platform_info.h"
#include "base/event_filter.h"
#include "styles/style_payments.h"
@@ -189,7 +189,7 @@ struct SimpleFieldState {
[[nodiscard]] QString Parse(const FieldConfig &config) {
if (config.type == FieldType::Country) {
return Data::CountryNameByISO2(config.value);
return Countries::CountryNameByISO2(config.value);
} else if (config.type == FieldType::Money) {
const auto amount = config.value.toLongLong();
if (!amount) {
@@ -490,7 +490,7 @@ void Field::setupCountry() {
QObject::connect(_masked, &MaskedInputField::focused, [=] {
setFocus();
const auto name = Data::CountryNameByISO2(_countryIso2);
const auto name = Countries::CountryNameByISO2(_countryIso2);
const auto country = !name.isEmpty()
? _countryIso2
: !_config.defaultCountry.isEmpty()
@@ -503,7 +503,7 @@ void Field::setupCountry() {
raw->countryChosen(
) | rpl::start_with_next([=](QString iso2) {
_countryIso2 = iso2;
_masked->setText(Data::CountryNameByISO2(iso2));
_masked->setText(Countries::CountryNameByISO2(iso2));
_masked->hideError();
raw->closeBox();
if (!iso2.isEmpty()) {

View File

@@ -16,7 +16,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/wrap/fade_wrap.h"
#include "ui/text/format_values.h"
#include "ui/text/text_utilities.h"
#include "data/data_countries.h"
#include "countries/countries_instance.h"
#include "lang/lang_keys.h"
#include "base/unixtime.h"
#include "styles/style_payments.h"
@@ -508,7 +508,7 @@ void FormSummary::setupSections(not_null<VerticalLayout*> layout) {
push(_information.shippingAddress.address2);
push(_information.shippingAddress.city);
push(_information.shippingAddress.state);
push(Data::CountryNameByISO2(
push(Countries::CountryNameByISO2(
_information.shippingAddress.countryIso2));
push(_information.shippingAddress.postcode);
add(