From 839f19a1411b42a870c67dd598844737596897fb Mon Sep 17 00:00:00 2001 From: Thibault Deckers Date: Tue, 10 May 2022 10:32:26 +0900 Subject: [PATCH] #247 fixed flag from lower case country code --- CHANGELOG.md | 2 ++ lib/model/entry.dart | 2 +- lib/model/filters/location.dart | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 20dfbe68f..1183df518 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ All notable changes to this project will be documented in this file. ### Added +- Bottom navigation bar +- Collection: thumbnail overlay tag icon - Settings: search - `huawei` app flavor (Petal Maps, no Crashlytics) diff --git a/lib/model/entry.dart b/lib/model/entry.dart index 262d8d24c..7e9d89805 100644 --- a/lib/model/entry.dart +++ b/lib/model/entry.dart @@ -584,7 +584,7 @@ class AvesEntry { : call()); if (addresses.isNotEmpty) { final address = addresses.first; - final cc = address.countryCode; + final cc = address.countryCode?.toUpperCase(); final cn = address.countryName; final aa = address.adminArea; addressDetails = AddressDetails( diff --git a/lib/model/filters/location.dart b/lib/model/filters/location.dart index 9bdca8654..17a94a947 100644 --- a/lib/model/filters/location.dart +++ b/lib/model/filters/location.dart @@ -84,7 +84,7 @@ class LocationFilter extends CoveredCollectionFilter { static String? countryCodeToFlag(String? code) { if (code == null || code.length != 2) return null; - return String.fromCharCodes(code.codeUnits.map((letter) => letter += _countryCodeToFlagDiff)); + return String.fromCharCodes(code.toUpperCase().codeUnits.map((letter) => letter += _countryCodeToFlagDiff)); } }