Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't error when a playlist has no modification date #145

Merged
merged 1 commit into from
Oct 13, 2024

Conversation

Abestanis
Copy link
Collaborator

@Abestanis Abestanis commented Jul 14, 2024

Use the creation date if no modification date is present.

This fixes the following error observed on Crashlytics ([1], maybe also [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13], [14], [15]):

Stacktrace
          Fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError: type 'Null' is not a subtype of type 'int' in type cast
       at new Playlist.fromMap(playlist.dart:115)
       at ListIterable.toList(dart:_internal)
       at ContentControl.refetch(content.dart:409)
       at Future.wait.<fn>(dart:async)
       at ContentControl.refetchSongsAndPlaylists(content.dart:682)
       at ContentControl.createPlaylist(content.dart:739)
       at ShowFunctions.showCreatePlaylist.submit(show_functions.dart:64)

@Abestanis Abestanis added the bug Something isn't working label Jul 14, 2024
@Abestanis Abestanis requested a review from nt4f04uNd July 14, 2024 23:18
@Abestanis Abestanis merged commit 98c8c9b into nt4f04uNd:master Oct 13, 2024
2 checks passed
@Abestanis Abestanis deleted the fix/playlist_no_modification branch October 13, 2024 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants