🐛 Fix selection now won't work in library
This commit is contained in:
@@ -524,6 +524,7 @@ class LibraryScreen extends HookConsumerWidget {
|
|||||||
showTrailingIcon: true,
|
showTrailingIcon: true,
|
||||||
onTrailingPressed: () =>
|
onTrailingPressed: () =>
|
||||||
_showTrackOptions(context, ref, track),
|
_showTrackOptions(context, ref, track),
|
||||||
|
onLongPress: () => toggleSelection(track.id),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
final loadingNotifier = ref.read(
|
final loadingNotifier = ref.read(
|
||||||
remoteTrackLoadingProvider.notifier,
|
remoteTrackLoadingProvider.notifier,
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import 'package:styled_widget/styled_widget.dart';
|
|||||||
class TrackTile extends StatelessWidget {
|
class TrackTile extends StatelessWidget {
|
||||||
final db.Track track;
|
final db.Track track;
|
||||||
final VoidCallback? onTap;
|
final VoidCallback? onTap;
|
||||||
|
final VoidCallback? onLongPress;
|
||||||
final bool isPlaying;
|
final bool isPlaying;
|
||||||
final bool showTrailingIcon;
|
final bool showTrailingIcon;
|
||||||
final VoidCallback? onTrailingPressed;
|
final VoidCallback? onTrailingPressed;
|
||||||
@@ -17,6 +18,7 @@ class TrackTile extends StatelessWidget {
|
|||||||
super.key,
|
super.key,
|
||||||
required this.track,
|
required this.track,
|
||||||
this.onTap,
|
this.onTap,
|
||||||
|
this.onLongPress,
|
||||||
this.isPlaying = false,
|
this.isPlaying = false,
|
||||||
this.leading,
|
this.leading,
|
||||||
this.padding,
|
this.padding,
|
||||||
@@ -90,6 +92,7 @@ class TrackTile extends StatelessWidget {
|
|||||||
)
|
)
|
||||||
: null,
|
: null,
|
||||||
onTap: onTap,
|
onTap: onTap,
|
||||||
|
onLongPress: onLongPress,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user