diff --git a/android/gradle.properties b/android/gradle.properties index 14eed3944b547f02179b1b42f4b601f91b7957c0..aa51064abebb79ba519e600afb7af23779154d4e 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,5 +1,5 @@ org.gradle.jvmargs=-Xmx1536M android.useAndroidX=true android.enableJetifier=true -app.versionName=0.0.4 -app.versionCode=4 +app.versionName=0.0.5 +app.versionCode=5 diff --git a/assets/translations/en.json b/assets/translations/en.json index 1ec64c12eb29a3f1441a24c8ed7ab6bad0ab25e8..d829a407a08911370be7f64e9b4f467dacaee8dc 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -3,6 +3,7 @@ "global_statistics": "Global statistics", "statistics_total_scrobbles_count": "Total scrobbles count:", + "statistics_last_scrobble": "Last scrobble: ", "statistics_selected_period": "On last {daysCount} days:", "statistics_recent_scrobbles_count": "Scrobbles:", "statistics_discoveries": "Discoveries:", diff --git a/assets/translations/fr.json b/assets/translations/fr.json index 9800cee1185a367e6228019a778cd86b6d6b0052..d6bb8b044a77c15e02cef924075a254b64fe2bce 100644 --- a/assets/translations/fr.json +++ b/assets/translations/fr.json @@ -3,6 +3,7 @@ "global_statistics": "Statistiques globales d'écoutes", "statistics_total_scrobbles_count": "Nombre total d'écoutes :", + "statistics_last_scrobble": "Dernière écoute :", "statistics_selected_period": "Sur les {daysCount} derniers jours:", "statistics_recent_scrobbles_count": "Écoutes :", "statistics_discoveries": "Découvertes :", diff --git a/fastlane/metadata/android/en-US/changelogs/5.txt b/fastlane/metadata/android/en-US/changelogs/5.txt new file mode 100644 index 0000000000000000000000000000000000000000..95c717406d1b8f42d8f06814b2778456644c4767 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/5.txt @@ -0,0 +1 @@ +Display last scrobble date/time diff --git a/fastlane/metadata/android/fr-FR/changelogs/5.txt b/fastlane/metadata/android/fr-FR/changelogs/5.txt new file mode 100644 index 0000000000000000000000000000000000000000..c44ae99b752b93c413f16e9bac948cf5adf1ff7b --- /dev/null +++ b/fastlane/metadata/android/fr-FR/changelogs/5.txt @@ -0,0 +1 @@ +Affiche la date/heure de la dernière écoute enregistrée diff --git a/lib/models/statistics.dart b/lib/models/statistics.dart index 70ff49df216d68db8a170b77921e72f04b1d9477..aebb5960a18de99acf7ca7ae8ee4237a6a19d0a6 100644 --- a/lib/models/statistics.dart +++ b/lib/models/statistics.dart @@ -4,6 +4,7 @@ class StatisticsData { final int firstPlayedArtistsCount; final int firstPlayedTracksCount; final int selectedPeriod; + final DateTime lastScrobble; const StatisticsData({ required this.totalCount, @@ -11,6 +12,7 @@ class StatisticsData { required this.firstPlayedArtistsCount, required this.firstPlayedTracksCount, required this.selectedPeriod, + required this.lastScrobble, }); factory StatisticsData.fromJson(Map<String, dynamic> json) { @@ -20,6 +22,9 @@ class StatisticsData { firstPlayedArtistsCount: json['firstPlayedArtistsCount'] as int, firstPlayedTracksCount: json['firstPlayedTracksCount'] as int, selectedPeriod: json['selectedPeriod'] as int, + lastScrobble: DateTime.parse( + json['lastScrobble']['date'], + ), ); } } diff --git a/lib/ui/widgets/main_screen/statistics.dart b/lib/ui/widgets/main_screen/statistics.dart index c0b555be184c021daf4a82de97c2bffffb8874b3..0dd1aeb4384a938ad994d94c5726d27d6a4af1d7 100644 --- a/lib/ui/widgets/main_screen/statistics.dart +++ b/lib/ui/widgets/main_screen/statistics.dart @@ -40,6 +40,12 @@ class Statistics extends StatelessWidget { snapshot.data!.totalCount.toString(), style: textTheme.bodyMedium, ), + Text( + tr('statistics_last_scrobble') + + ' ' + + DateFormat().format(snapshot.data!.lastScrobble), + style: textTheme.bodyMedium, + ), Text( 'statistics_selected_period', style: textTheme.bodyMedium, diff --git a/pubspec.yaml b/pubspec.yaml index 973a1df8443895dcd950682b4bd3e85e20e7af4b..e80d1d15a5bbc3cfaae44bf5933bd48c974043d4 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: Display scrobbles data and charts publish_to: 'none' -version: 0.0.4+4 +version: 0.0.5+5 environment: sdk: '^3.0.0'