un-break DeezerAudioSource (seek)
remove kDebugMode check on QueueListWidget in TabBarView Pop ZoomableImage on ESC
This commit is contained in:
parent
6f1fb73ed8
commit
4c46399f9a
|
@ -3,6 +3,6 @@
|
|||
<background android:drawable="@color/ic_launcher_background"/>
|
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||
<monochrome>
|
||||
<inset android:drawable="@drawable/ic_logo" android:inset="30dp" />
|
||||
<inset android:drawable="@drawable/ic_logo" android:inset="24dp" />
|
||||
</monochrome>
|
||||
</adaptive-icon>
|
|
@ -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) {
|
||||
|
|
|
@ -165,7 +165,7 @@ class ZoomableImageRoute extends StatefulWidget {
|
|||
class _ZoomableImageRouteState extends State<ZoomableImageRoute> {
|
||||
bool photoViewOpened = false;
|
||||
final controller = PhotoViewController();
|
||||
final _focusNode = FocusNode();
|
||||
final _focusNode = FocusScopeNode();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -209,7 +209,7 @@ class _ZoomableImageRouteState extends State<ZoomableImageRoute> {
|
|||
? null
|
||||
: PhotoViewHeroAttributes(tag: widget.heroKey!),
|
||||
backgroundDecoration:
|
||||
const BoxDecoration(color: Color.fromARGB(0x90, 0, 0, 0))),
|
||||
const BoxDecoration(color: Color.fromARGB(85, 0, 0, 0))),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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),
|
||||
],
|
||||
|
|
|
@ -135,6 +135,7 @@ class MenuSheet {
|
|||
isScrollControlled: true,
|
||||
enableDrag: false,
|
||||
showDragHandle: false,
|
||||
useSafeArea: true,
|
||||
elevation: 0.0,
|
||||
builder: (BuildContext context) {
|
||||
return DraggableScrollableSheet(
|
||||
|
|
|
@ -228,7 +228,7 @@ class PlayerBar extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
return SizedBox(
|
||||
height: 68.0,
|
||||
child: Column(mainAxisSize: MainAxisSize.min, children: <Widget>[
|
||||
child: Column(mainAxisSize: MainAxisSize.max, children: <Widget>[
|
||||
Expanded(
|
||||
child: StreamBuilder<MediaItem?>(
|
||||
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(
|
||||
|
|
|
@ -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<BackgroundProvider>.value(
|
||||
value: Provider.of<BackgroundProvider>(context),
|
||||
child: const LyricsScreen());
|
||||
if (settings.playerBackgroundOnLyrics) {
|
||||
Navigator.of(context).push(FadePageRoute(builder: builder));
|
||||
return;
|
||||
}
|
||||
Navigator.of(context).pushRoute(builder: builder);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue