From 1d22ec543945620fa029eaf63fdaec8987c0bc42 Mon Sep 17 00:00:00 2001 From: Vadim <44135514+vodemn@users.noreply.github.com> Date: Mon, 11 Nov 2024 18:51:16 +0100 Subject: [PATCH] Removed language switch from release notes dialog (#198) * Removed language switch from release notes dialog --- .../widget_dialog_release_notes.dart | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/lib/screens/shared/release_notes_dialog/widget_dialog_release_notes.dart b/lib/screens/shared/release_notes_dialog/widget_dialog_release_notes.dart index 390399d..8323fa9 100644 --- a/lib/screens/shared/release_notes_dialog/widget_dialog_release_notes.dart +++ b/lib/screens/shared/release_notes_dialog/widget_dialog_release_notes.dart @@ -1,8 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart' show rootBundle; -import 'package:lightmeter/data/models/supported_locale.dart'; import 'package:lightmeter/generated/l10n.dart'; -import 'package:lightmeter/providers/user_preferences_provider.dart'; import 'package:lightmeter/res/dimens.dart'; class ReleaseNotesDialog extends StatelessWidget { @@ -40,17 +38,8 @@ class ReleaseNotesDialog extends StatelessWidget { } Future loadReleaseNotes(BuildContext context) async { - late final String localeName; - - switch (UserPreferencesProvider.localeOf(context)) { - case SupportedLocale.ru: - localeName = SupportedLocale.ru.name; - default: - localeName = SupportedLocale.en.name; - } - try { - return rootBundle.loadString('assets/release_notes/release_notes_${localeName}_$version.md'); + return rootBundle.loadString('assets/release_notes/release_notes_en_$version.md'); } catch (e) { return ''; }