-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: make use of pinned albums in the mobile view, persist local aud…
…io index (again) (#1044)
- Loading branch information
1 parent
699eb9b
commit 195f57f
Showing
11 changed files
with
145 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import '../../extensions/build_context_x.dart'; | ||
import '../../l10n/l10n.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:yaru/yaru.dart'; | ||
import 'theme.dart'; | ||
|
||
class AudioCardVignette extends StatelessWidget { | ||
const AudioCardVignette({ | ||
super.key, | ||
this.onTap, | ||
required this.iconData, | ||
}); | ||
|
||
final void Function()? onTap; | ||
final IconData iconData; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
final colorScheme = context.colorScheme; | ||
const borderRadius = BorderRadius.only( | ||
bottomLeft: Radius.circular(kYaruContainerRadius), | ||
topRight: Radius.circular(kYaruContainerRadius), | ||
); | ||
return Tooltip( | ||
message: context.l10n.unPinAlbum, | ||
child: InkWell( | ||
borderRadius: borderRadius, | ||
onTap: onTap, | ||
child: Container( | ||
decoration: BoxDecoration( | ||
color: colorScheme.inverseSurface, | ||
borderRadius: borderRadius, | ||
), | ||
width: audioCardDimension / (isMobile ? 3 : 4), | ||
height: audioCardDimension / (isMobile ? 3 : 4), | ||
child: Icon( | ||
iconData, | ||
color: colorScheme.onInverseSurface, | ||
), | ||
), | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
lib/local_audio/view/local_audio_view.dart → lib/local_audio/local_audio_view.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import '../../l10n/l10n.dart'; | ||
import '../l10n/l10n.dart'; | ||
|
||
enum LocalAudioView { | ||
titles, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters