Skip to content
Snippets Groups Projects
Commit 7903b8ec authored by Benoît Harrault's avatar Benoît Harrault
Browse files

Merge branch '43-fix-chart-when-empty-or-loading-data' into 'master'

Resolve "Fix chart when empty or loading data"

Closes #43

See merge request !40
parents 2cf6b433 c62ed2cc
No related branches found
No related tags found
1 merge request!40Resolve "Fix chart when empty or loading data"
Pipeline #4694 passed
org.gradle.jvmargs=-Xmx1536M org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true android.useAndroidX=true
android.enableJetifier=true android.enableJetifier=true
app.versionName=0.0.39 app.versionName=0.0.40
app.versionCode=39 app.versionCode=40
Fix compute "top artists" data.
Correction sur calcul des données "top artistes".
...@@ -55,7 +55,7 @@ class TopArtistsData { ...@@ -55,7 +55,7 @@ class TopArtistsData {
List<TopArtistsDataValue> topArtists = []; List<TopArtistsDataValue> topArtists = [];
Map<String, List<TopArtistsStreamDataValue>> topArtistsStream = {}; Map<String, List<TopArtistsStreamDataValue>> topArtistsStream = {};
json?['top-artists'].forEach((element) { json?['top-artists']?.forEach((element) {
TopArtistsDataValue value = TopArtistsDataValue( TopArtistsDataValue value = TopArtistsDataValue(
artistName: element['artistName'] as String, artistName: element['artistName'] as String,
count: element['count'] as int, count: element['count'] as int,
...@@ -64,7 +64,7 @@ class TopArtistsData { ...@@ -64,7 +64,7 @@ class TopArtistsData {
topArtists.add(value); topArtists.add(value);
}); });
json?['top-artists-stream-by-date'].keys.forEach((date) { json?['top-artists-stream-by-date']?.keys?.forEach((date) {
if (json['top-artists-stream-by-date'][date] is Map<String, dynamic>) { if (json['top-artists-stream-by-date'][date] is Map<String, dynamic>) {
Map<String, dynamic> content = json['top-artists-stream-by-date'][date]; Map<String, dynamic> content = json['top-artists-stream-by-date'][date];
......
...@@ -3,7 +3,7 @@ description: Display scrobbles data and charts ...@@ -3,7 +3,7 @@ description: Display scrobbles data and charts
publish_to: 'none' publish_to: 'none'
version: 0.0.39+39 version: 0.0.40+40
environment: environment:
sdk: '^3.0.0' sdk: '^3.0.0'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment