From 61d980add2e0aa3eb98324c9d745fc658823b770 Mon Sep 17 00:00:00 2001 From: Leptopoda Date: Mon, 25 Oct 2021 19:24:53 +0200 Subject: [PATCH] cleanup constants --- src/ui/flutter_app/lib/models/display.dart | 2 +- .../personalization_settings_page.dart | 4 +--- src/ui/flutter_app/lib/shared/constants.dart | 2 -- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/ui/flutter_app/lib/models/display.dart b/src/ui/flutter_app/lib/models/display.dart index 303e4781..5abd5c34 100644 --- a/src/ui/flutter_app/lib/models/display.dart +++ b/src/ui/flutter_app/lib/models/display.dart @@ -34,7 +34,7 @@ part 'display.g.dart'; @immutable class Display { Display({ - this.languageCode = Constants.defaultLocale, + this.languageCode, this.standardNotationEnabled = true, this.isPieceCountInHandShown = true, this.isNotationsShown = false, diff --git a/src/ui/flutter_app/lib/screens/personalization_settings/personalization_settings_page.dart b/src/ui/flutter_app/lib/screens/personalization_settings/personalization_settings_page.dart index 78577d64..ffaeff94 100644 --- a/src/ui/flutter_app/lib/screens/personalization_settings/personalization_settings_page.dart +++ b/src/ui/flutter_app/lib/screens/personalization_settings/personalization_settings_page.dart @@ -24,7 +24,6 @@ import 'package:sanmill/models/color.dart'; import 'package:sanmill/models/display.dart'; import 'package:sanmill/services/language_info.dart'; import 'package:sanmill/services/storage/storage.dart'; -import 'package:sanmill/shared/constants.dart'; import 'package:sanmill/shared/list_item_divider.dart'; import 'package:sanmill/shared/settings/settings_card.dart'; import 'package:sanmill/shared/settings/settings_list_tile.dart'; @@ -229,8 +228,7 @@ class PersonalizationSettingsPage extends StatelessWidget { children: [ SettingsListTile( titleString: S.of(context).language, - trailingString: LocalDatabaseService.display.languageCode != - Constants.defaultLocale + trailingString: LocalDatabaseService.display.languageCode != null ? languageCodeToStrings[_display.languageCode] : '', onTap: () => showDialog( diff --git a/src/ui/flutter_app/lib/shared/constants.dart b/src/ui/flutter_app/lib/shared/constants.dart index 2e47ea0a..dd59b575 100644 --- a/src/ui/flutter_app/lib/shared/constants.dart +++ b/src/ui/flutter_app/lib/shared/constants.dart @@ -32,8 +32,6 @@ class Constants { "assets/files/environment_variables.txt"; static const String gplLicenseFilename = "assets/licenses/GPL-3.0.txt"; - static const Locale? defaultLocale = null; - static const String feedbackSubjectPrefix = "[$appName] $projectName "; static const String feedbackSubjectSuffix = " Feedback";