Skip to content

Commit

Permalink
📝 Add documentation to logOfflineListen functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxr1998 committed Dec 5, 2023
1 parent 3bd08b1 commit 1071e87
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/services/offline_listen_helper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ class OfflineListenLogHelper {
return File("${directory.path}/listens.json");
}

/// Logs a listen to a file.
///
/// This is used when the user is offline or submitting live playback events fails.
Future<void> logOfflineListen(MediaItem item) async {
final itemJson = item.extras!["itemJson"];

Expand All @@ -41,6 +44,11 @@ class OfflineListenLogHelper {
);
}

/// Logs a listen to a file.
///
/// This is used when the user is offline or submitting live playback events fails.
/// The [timestamp] provided to this function should be in seconds
/// and marks the time the track was stopped.
Future<void> _logOfflineListen({
required int timestamp,
required String itemId,
Expand Down

0 comments on commit 1071e87

Please sign in to comment.