Skip to content
This repository has been archived by the owner on May 26, 2024. It is now read-only.

Commit

Permalink
hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
7reax committed May 3, 2022
1 parent 61d95ba commit 710cad4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import 'package:system_theme/system_theme.dart';
import 'package:window_manager/window_manager.dart';

final bool micaSupported = SysInfo.operatingSystemName.contains('Windows 11');
final supportedLocales = ['en', 'de', 'pl', 'ru'];
Box box = Hive.box('data');
String applicationDocumentsDirectory = '';

Expand All @@ -48,7 +49,7 @@ void main() async {
await StorageHelper.initialiseHive();
var delegate = await LocalizationDelegate.create(
fallbackLocale: 'en',
supportedLocales: ['en', 'de', 'pl', 'ru'],
supportedLocales: supportedLocales,
preferences: TranslatePreferences(),
);
if (micaSupported) {
Expand Down
2 changes: 1 addition & 1 deletion lib/widgets/navigation_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class _NavigationBarState extends State<NavigationBar> {

@override
void initState() {
Jiffy.locale(AppLocale().getLocale().languageCode);
Jiffy.locale(supportedLocales.contains(AppLocale().getLocale().languageCode) ? AppLocale().getLocale().languageCode : 'en');
Timer.run(() {
try {
ProfileService.generateFiles();
Expand Down

0 comments on commit 710cad4

Please sign in to comment.