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"/>
|
<background android:drawable="@color/ic_launcher_background"/>
|
||||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||||
<monochrome>
|
<monochrome>
|
||||||
<inset android:drawable="@drawable/ic_logo" android:inset="30dp" />
|
<inset android:drawable="@drawable/ic_logo" android:inset="24dp" />
|
||||||
</monochrome>
|
</monochrome>
|
||||||
</adaptive-icon>
|
</adaptive-icon>
|
||||||
|
|
@ -225,10 +225,6 @@ class DeezerAudioSource extends StreamAudioSource {
|
||||||
final key = getKey(trackId);
|
final key = getKey(trackId);
|
||||||
|
|
||||||
await for (var bytes in source) {
|
await for (var bytes in source) {
|
||||||
if (dropBytes > 0) {
|
|
||||||
bytes = bytes.sublist(dropBytes);
|
|
||||||
}
|
|
||||||
|
|
||||||
buffer.addAll(bytes);
|
buffer.addAll(bytes);
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
@ -243,6 +239,11 @@ class DeezerAudioSource extends StreamAudioSource {
|
||||||
bytes = decryptChunk(key, bytes);
|
bytes = decryptChunk(key, bytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (dropBytes > 0) {
|
||||||
|
bytes = bytes.sublist(dropBytes);
|
||||||
|
dropBytes = 0;
|
||||||
|
}
|
||||||
|
|
||||||
counter++;
|
counter++;
|
||||||
yield bytes;
|
yield bytes;
|
||||||
}
|
}
|
||||||
|
|
@ -255,7 +256,15 @@ class DeezerAudioSource extends StreamAudioSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
// add remaining items in buffer
|
// add remaining items in buffer
|
||||||
if (buffer.isNotEmpty) yield buffer;
|
|
||||||
|
if (buffer.isNotEmpty) {
|
||||||
|
if (dropBytes > 0) {
|
||||||
|
yield buffer.sublist(dropBytes);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
yield buffer;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
@ -280,7 +289,7 @@ class DeezerAudioSource extends StreamAudioSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
// determine quality to use
|
// determine quality to use
|
||||||
_currentQuality = _getQuality!.call();
|
_currentQuality = _getQuality.call();
|
||||||
|
|
||||||
final Uri uri;
|
final Uri uri;
|
||||||
if (_downloadUrl != null) {
|
if (_downloadUrl != null) {
|
||||||
|
|
|
||||||
|
|
@ -165,7 +165,7 @@ class ZoomableImageRoute extends StatefulWidget {
|
||||||
class _ZoomableImageRouteState extends State<ZoomableImageRoute> {
|
class _ZoomableImageRouteState extends State<ZoomableImageRoute> {
|
||||||
bool photoViewOpened = false;
|
bool photoViewOpened = false;
|
||||||
final controller = PhotoViewController();
|
final controller = PhotoViewController();
|
||||||
final _focusNode = FocusNode();
|
final _focusNode = FocusScopeNode();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
|
|
@ -209,7 +209,7 @@ class _ZoomableImageRouteState extends State<ZoomableImageRoute> {
|
||||||
? null
|
? null
|
||||||
: PhotoViewHeroAttributes(tag: widget.heroKey!),
|
: PhotoViewHeroAttributes(tag: widget.heroKey!),
|
||||||
backgroundDecoration:
|
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(
|
child: const Column(
|
||||||
children: [
|
children: [
|
||||||
LyricsWidget(),
|
Expanded(child: LyricsWidget()),
|
||||||
Divider(height: 1.0, thickness: 1.0),
|
Divider(height: 1.0, thickness: 1.0),
|
||||||
PlayerBar(backgroundColor: Colors.transparent),
|
PlayerBar(backgroundColor: Colors.transparent),
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -135,6 +135,7 @@ class MenuSheet {
|
||||||
isScrollControlled: true,
|
isScrollControlled: true,
|
||||||
enableDrag: false,
|
enableDrag: false,
|
||||||
showDragHandle: false,
|
showDragHandle: false,
|
||||||
|
useSafeArea: true,
|
||||||
elevation: 0.0,
|
elevation: 0.0,
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return DraggableScrollableSheet(
|
return DraggableScrollableSheet(
|
||||||
|
|
|
||||||
|
|
@ -228,7 +228,7 @@ class PlayerBar extends StatelessWidget {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
height: 68.0,
|
height: 68.0,
|
||||||
child: Column(mainAxisSize: MainAxisSize.min, children: <Widget>[
|
child: Column(mainAxisSize: MainAxisSize.max, children: <Widget>[
|
||||||
Expanded(
|
Expanded(
|
||||||
child: StreamBuilder<MediaItem?>(
|
child: StreamBuilder<MediaItem?>(
|
||||||
stream: audioHandler.mediaItem,
|
stream: audioHandler.mediaItem,
|
||||||
|
|
@ -260,6 +260,7 @@ class PlayerBar extends StatelessWidget {
|
||||||
const EdgeInsets.symmetric(horizontal: 8.0),
|
const EdgeInsets.symmetric(horizontal: 8.0),
|
||||||
onTap: onTap,
|
onTap: onTap,
|
||||||
leading: AnimatedSwitcher(
|
leading: AnimatedSwitcher(
|
||||||
|
key: const ValueKey('player_bar_art_switcher'),
|
||||||
duration: const Duration(milliseconds: 250),
|
duration: const Duration(milliseconds: 250),
|
||||||
child: leadingWidget),
|
child: leadingWidget),
|
||||||
title: Text(
|
title: Text(
|
||||||
|
|
|
||||||
|
|
@ -386,9 +386,7 @@ class _DesktopTabView extends StatelessWidget {
|
||||||
child: Material(
|
child: Material(
|
||||||
type: MaterialType.transparency,
|
type: MaterialType.transparency,
|
||||||
child: TabBarView(children: [
|
child: TabBarView(children: [
|
||||||
!kDebugMode
|
QueueListWidget(),
|
||||||
? Text('Queue view is disabled in Debug mode')
|
|
||||||
: QueueListWidget(),
|
|
||||||
LyricsWidget(),
|
LyricsWidget(),
|
||||||
]),
|
]),
|
||||||
),
|
),
|
||||||
|
|
@ -1185,10 +1183,6 @@ class BottomBarControls extends StatelessWidget {
|
||||||
builder(ctx) => ChangeNotifierProvider<BackgroundProvider>.value(
|
builder(ctx) => ChangeNotifierProvider<BackgroundProvider>.value(
|
||||||
value: Provider.of<BackgroundProvider>(context),
|
value: Provider.of<BackgroundProvider>(context),
|
||||||
child: const LyricsScreen());
|
child: const LyricsScreen());
|
||||||
if (settings.playerBackgroundOnLyrics) {
|
|
||||||
Navigator.of(context).push(FadePageRoute(builder: builder));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Navigator.of(context).pushRoute(builder: builder);
|
Navigator.of(context).pushRoute(builder: builder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue