diff --git a/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml index 7f1b583..f968926 100644 --- a/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +++ b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -3,6 +3,6 @@ - + \ No newline at end of file diff --git a/lib/api/deezer_audio_source.dart b/lib/api/deezer_audio_source.dart index 31fc74e..00cbe35 100644 --- a/lib/api/deezer_audio_source.dart +++ b/lib/api/deezer_audio_source.dart @@ -225,10 +225,6 @@ class DeezerAudioSource extends StreamAudioSource { final key = getKey(trackId); await for (var bytes in source) { - if (dropBytes > 0) { - bytes = bytes.sublist(dropBytes); - } - buffer.addAll(bytes); int i; @@ -243,6 +239,11 @@ class DeezerAudioSource extends StreamAudioSource { bytes = decryptChunk(key, bytes); } + if (dropBytes > 0) { + bytes = bytes.sublist(dropBytes); + dropBytes = 0; + } + counter++; yield bytes; } @@ -255,7 +256,15 @@ class DeezerAudioSource extends StreamAudioSource { } // add remaining items in buffer - if (buffer.isNotEmpty) yield buffer; + + if (buffer.isNotEmpty) { + if (dropBytes > 0) { + yield buffer.sublist(dropBytes); + return; + } + + yield buffer; + } } @override @@ -280,7 +289,7 @@ class DeezerAudioSource extends StreamAudioSource { } // determine quality to use - _currentQuality = _getQuality!.call(); + _currentQuality = _getQuality.call(); final Uri uri; if (_downloadUrl != null) { diff --git a/lib/ui/cached_image.dart b/lib/ui/cached_image.dart index 3d81a1b..9789f9e 100644 --- a/lib/ui/cached_image.dart +++ b/lib/ui/cached_image.dart @@ -165,7 +165,7 @@ class ZoomableImageRoute extends StatefulWidget { class _ZoomableImageRouteState extends State { bool photoViewOpened = false; final controller = PhotoViewController(); - final _focusNode = FocusNode(); + final _focusNode = FocusScopeNode(); @override void initState() { @@ -209,7 +209,7 @@ class _ZoomableImageRouteState extends State { ? null : PhotoViewHeroAttributes(tag: widget.heroKey!), backgroundDecoration: - const BoxDecoration(color: Color.fromARGB(0x90, 0, 0, 0))), + const BoxDecoration(color: Color.fromARGB(85, 0, 0, 0))), ); } } diff --git a/lib/ui/lyrics_screen.dart b/lib/ui/lyrics_screen.dart index 7171567..e19e4ff 100644 --- a/lib/ui/lyrics_screen.dart +++ b/lib/ui/lyrics_screen.dart @@ -29,7 +29,7 @@ class LyricsScreen extends StatelessWidget { ), child: const Column( children: [ - LyricsWidget(), + Expanded(child: LyricsWidget()), Divider(height: 1.0, thickness: 1.0), PlayerBar(backgroundColor: Colors.transparent), ], diff --git a/lib/ui/menu.dart b/lib/ui/menu.dart index 842d9a9..b709978 100644 --- a/lib/ui/menu.dart +++ b/lib/ui/menu.dart @@ -135,6 +135,7 @@ class MenuSheet { isScrollControlled: true, enableDrag: false, showDragHandle: false, + useSafeArea: true, elevation: 0.0, builder: (BuildContext context) { return DraggableScrollableSheet( diff --git a/lib/ui/player_bar.dart b/lib/ui/player_bar.dart index 597e815..489e920 100644 --- a/lib/ui/player_bar.dart +++ b/lib/ui/player_bar.dart @@ -228,7 +228,7 @@ class PlayerBar extends StatelessWidget { Widget build(BuildContext context) { return SizedBox( height: 68.0, - child: Column(mainAxisSize: MainAxisSize.min, children: [ + child: Column(mainAxisSize: MainAxisSize.max, children: [ Expanded( child: StreamBuilder( stream: audioHandler.mediaItem, @@ -260,6 +260,7 @@ class PlayerBar extends StatelessWidget { const EdgeInsets.symmetric(horizontal: 8.0), onTap: onTap, leading: AnimatedSwitcher( + key: const ValueKey('player_bar_art_switcher'), duration: const Duration(milliseconds: 250), child: leadingWidget), title: Text( diff --git a/lib/ui/player_screen.dart b/lib/ui/player_screen.dart index 61eb3fa..ff29b1e 100644 --- a/lib/ui/player_screen.dart +++ b/lib/ui/player_screen.dart @@ -386,9 +386,7 @@ class _DesktopTabView extends StatelessWidget { child: Material( type: MaterialType.transparency, child: TabBarView(children: [ - !kDebugMode - ? Text('Queue view is disabled in Debug mode') - : QueueListWidget(), + QueueListWidget(), LyricsWidget(), ]), ), @@ -1185,10 +1183,6 @@ class BottomBarControls extends StatelessWidget { builder(ctx) => ChangeNotifierProvider.value( value: Provider.of(context), child: const LyricsScreen()); - if (settings.playerBackgroundOnLyrics) { - Navigator.of(context).push(FadePageRoute(builder: builder)); - return; - } Navigator.of(context).pushRoute(builder: builder); } }