A cross platform Audiobookshelf client for Android and iOS
Dart
Fix episode add-to-absorbing and quiet socket progress logs
Nathan Poulson30e2a4d28785
diff --git a/lib/services/socket_service.dart b/lib/services/socket_service.dartindex e6b71066..27e7c3f6 100644--- a/lib/services/socket_service.dart+++ b/lib/services/socket_service.dart@@ -58,7 +58,6 @@ class SocketService {if (data is Map<String, dynamic>) {final patch = data['data'] as Map<String, dynamic>?;if (patch != null) {- debugPrint('[Socket] Progress updated for ${patch['libraryItemId']}');onProgressUpdated?.call(patch);}}diff --git a/lib/widgets/episode_list_sheet.dart b/lib/widgets/episode_list_sheet.dartindex 2872bd85..86276ff8 100644--- a/lib/widgets/episode_list_sheet.dart+++ b/lib/widgets/episode_list_sheet.dart@@ -964,13 +964,13 @@ class _EpisodeDetailSheetState extends State<EpisodeDetailSheet> {child: Column(mainAxisSize: MainAxisSize.min, children: [Center(child: Container(width: 40, height: 4, margin: const EdgeInsets.only(bottom: 16),decoration: BoxDecoration(color: cs.onSurface.withValues(alpha: 0.24), borderRadius: BorderRadius.circular(2)))),- _moreItem(cs, lib.isOnAbsorbingList(_itemId)+ _moreItem(cs, lib.isOnAbsorbingList(dlKey)? Icons.remove_circle_outline_rounded : Icons.add_circle_outline_rounded,- lib.isOnAbsorbingList(_itemId) ? 'Remove from Absorbing' : 'Add to Absorbing',+ lib.isOnAbsorbingList(dlKey) ? 'Remove from Absorbing' : 'Add to Absorbing',onTap: () async {Navigator.pop(ctx);- if (lib.isOnAbsorbingList(_itemId)) {- await lib.removeFromAbsorbing(_itemId);+ if (lib.isOnAbsorbingList(dlKey)) {+ await lib.removeFromAbsorbing(dlKey);if (context.mounted) {ScaffoldMessenger.of(context).showSnackBar(SnackBar(duration: const Duration(seconds: 3),@@ -979,7 +979,11 @@ class _EpisodeDetailSheetState extends State<EpisodeDetailSheet> {shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12))));}} else {- await lib.addToAbsorbingQueue(_itemId);+ await lib.addToAbsorbingQueue(dlKey);+ final cached = Map<String, dynamic>.from(widget.podcastItem);+ cached['recentEpisode'] = Map<String, dynamic>.from(widget.episode);+ cached['_absorbingKey'] = dlKey;+ lib.absorbingItemCache[dlKey] = cached;if (context.mounted) {ScaffoldMessenger.of(context).showSnackBar(SnackBar(duration: const Duration(seconds: 3),