An open-source cross-platform alternative to AirDrop
fix: localize date format
Tien Do Nam3e3398d3b1fe
diff --git a/lib/model/receive_history_entry.dart b/lib/model/receive_history_entry.dartindex ddc3794d..dfc5fd38 100644--- a/lib/model/receive_history_entry.dart+++ b/lib/model/receive_history_entry.dart@@ -1,5 +1,6 @@import 'package:freezed_annotation/freezed_annotation.dart';import 'package:intl/intl.dart';+import 'package:localsend_app/gen/strings.g.dart';import 'package:localsend_app/model/file_type.dart';part 'receive_history_entry.freezed.dart';@@ -26,6 +27,6 @@ class ReceiveHistoryEntry with _$ReceiveHistoryEntry {/// Because the raw timestamp is saved in UTC, we need to transform it to local time zone first.String get timestampString {final localTimestamp = timestamp.toLocal();- return '${DateFormat.yMd().format(localTimestamp)} ${DateFormat.jm().format(localTimestamp)}';+ return '${DateFormat.yMd(LocaleSettings.currentLocale.languageTag).format(localTimestamp)} ${DateFormat.jm(LocaleSettings.currentLocale.languageTag).format(localTimestamp)}';}}