diff --git a/CHANGELOG.md b/CHANGELOG.md index c030ca2d..6c6aa75f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,26 @@ +# v2.2.0 + +### New +- Update checker +- Share options for playlists & track +- Android Skip to Next/Previous track from notification/lockscreen (https://github.com/KRTirtho/spotube/issues/91) +- Custom Accent Color Scheme support (Dark + Light) +- Custom Background Color Scheme support (Dark + Light) +- User customizable Audio Quality Option +- User customizable Track Matching Algorithm Option +- Material 3 Design Language and Flutter 3.0 +- Caching in Playlists, Album, Search, Playlist Categories, Artist Profile & Lyrics +- M1 Mac support via MacOS Universal Binary (untested) (https://github.com/KRTirtho/spotube/pull/87) + +### Improved +- Authentication is now persistent (no more re-login) +- Settings Page. Shows application details in About Dialog +- Playlist Create Dialog Scrollable +### Bug fixes +- private playlists of current user aren't shown fix (https://github.com/KRTirtho/spotube/issues/92) +- refresh token error causing re-login (culprit: internal lib spotify-dart) +- Typo in Login instructions URL + # v2.1.0 ### New diff --git a/lib/components/Settings/About.dart b/lib/components/Settings/About.dart index 48ce86bb..33ed7b88 100644 --- a/lib/components/Settings/About.dart +++ b/lib/components/Settings/About.dart @@ -26,7 +26,7 @@ class About extends HookWidget { final info = usePackageInfo( appName: "Spotube", packageName: "oss.krtirtho.Spotube", - version: "2.1.0"); + version: "2.2.0"); return ListTile( title: const Text("About Spotube"), diff --git a/lib/components/Settings/Settings.dart b/lib/components/Settings/Settings.dart index 27179dbd..9689a9dc 100644 --- a/lib/components/Settings/Settings.dart +++ b/lib/components/Settings/Settings.dart @@ -14,6 +14,7 @@ import 'package:spotube/models/SpotifyMarkets.dart'; import 'package:spotube/models/SpotubeTrack.dart'; import 'package:spotube/provider/Auth.dart'; import 'package:spotube/provider/UserPreferences.dart'; +import 'package:url_launcher/url_launcher_string.dart'; class Settings extends HookConsumerWidget { const Settings({Key? key}) : super(key: key); @@ -81,6 +82,7 @@ class Settings extends HookConsumerWidget { ], ListTile( title: const Text("Theme"), + horizontalTitleGap: 10, trailing: DropdownButton( value: preferences.themeMode, items: const [ @@ -111,6 +113,7 @@ class Settings extends HookConsumerWidget { const SizedBox(height: 10), ListTile( title: const Text("Accent Color Scheme"), + horizontalTitleGap: 10, trailing: ColorTile( color: preferences.accentColorScheme, onPressed: pickColorScheme(ColorSchemeType.accent), @@ -121,6 +124,7 @@ class Settings extends HookConsumerWidget { const SizedBox(height: 10), ListTile( title: const Text("Background Color Scheme"), + horizontalTitleGap: 10, trailing: ColorTile( color: preferences.backgroundColorScheme, onPressed: pickColorScheme(ColorSchemeType.background), @@ -132,6 +136,7 @@ class Settings extends HookConsumerWidget { ListTile( title: const Text("Market Place (Recommendation Country)"), + horizontalTitleGap: 10, trailing: DropdownButton( value: preferences.recommendationMarket, items: spotifyMarkets @@ -148,6 +153,7 @@ class Settings extends HookConsumerWidget { ), ListTile( title: const Text("Download lyrics along with the Track"), + horizontalTitleGap: 10, trailing: Switch.adaptive( activeColor: Theme.of(context).primaryColor, value: preferences.saveTrackLyrics, @@ -165,7 +171,7 @@ class Settings extends HookConsumerWidget { flex: 2, child: Text( "Format of the YouTube Search term (Case sensitive)", - style: Theme.of(context).textTheme.bodyText1, + style: Theme.of(context).textTheme.bodyText2, ), ), Expanded( @@ -180,6 +186,7 @@ class Settings extends HookConsumerWidget { if (auth.isAnonymous) ListTile( title: const Text("Login with your Spotify account"), + horizontalTitleGap: 10, trailing: ElevatedButton( child: Text("Connect with Spotify".toUpperCase()), onPressed: () { @@ -196,6 +203,7 @@ class Settings extends HookConsumerWidget { ), ListTile( title: const Text("Check for Update"), + horizontalTitleGap: 10, trailing: Switch.adaptive( activeColor: Theme.of(context).primaryColor, value: preferences.checkUpdate, @@ -205,6 +213,7 @@ class Settings extends HookConsumerWidget { ), ListTile( title: const Text("Track Match Algorithm"), + horizontalTitleGap: 10, trailing: DropdownButton( value: preferences.trackMatchAlgorithm, items: const [ @@ -234,6 +243,7 @@ class Settings extends HookConsumerWidget { ), ListTile( title: const Text("Audio Quality"), + horizontalTitleGap: 10, trailing: DropdownButton( value: preferences.audioQuality, items: const [ @@ -260,11 +270,14 @@ class Settings extends HookConsumerWidget { Auth auth = ref.watch(authProvider); return ListTile( title: const Text("Log out of this account"), + horizontalTitleGap: 10, trailing: ElevatedButton( child: const Text("Logout"), style: ButtonStyle( backgroundColor: MaterialStateProperty.all(Colors.red), + foregroundColor: + MaterialStateProperty.all(Colors.white), ), onPressed: () async { SharedPreferences localStorage = @@ -276,7 +289,30 @@ class Settings extends HookConsumerWidget { ), ); }), - const About(), + ListTile( + title: const Text( + "We know you Love Spotube", + style: TextStyle( + color: Colors.pink, + fontWeight: FontWeight.bold, + ), + ), + horizontalTitleGap: 10, + trailing: ElevatedButton.icon( + icon: const Icon(Icons.favorite_outline_rounded), + label: const Text("Please Sponsor/Donate"), + style: ElevatedButton.styleFrom( + primary: Colors.red[100], + onPrimary: Colors.pinkAccent, + padding: const EdgeInsets.all(15), + ), + onPressed: () { + launchUrlString("https://opencollective.com/spotube", + mode: LaunchMode.externalApplication); + }, + ), + ), + const About() ], ), ), diff --git a/lib/components/Shared/HeartButton.dart b/lib/components/Shared/HeartButton.dart index e8d2741c..1d177040 100644 --- a/lib/components/Shared/HeartButton.dart +++ b/lib/components/Shared/HeartButton.dart @@ -19,7 +19,7 @@ class HeartButton extends StatelessWidget { (!isLiked ? Icons.favorite_outline_rounded : Icons.favorite_rounded), - color: isLiked ? Colors.green : null, + color: isLiked ? Theme.of(context).primaryColor : null, ), onPressed: onPressed, ); diff --git a/lib/hooks/useUpdateChecker.dart b/lib/hooks/useUpdateChecker.dart index ca5b7e69..1efac132 100644 --- a/lib/hooks/useUpdateChecker.dart +++ b/lib/hooks/useUpdateChecker.dart @@ -47,8 +47,10 @@ void useUpdateChecker(WidgetRef ref) { useEffect(() { if (!isCheckUpdateEnabled) return null; checkUpdate().then((value) { - if (value.first == null) return; - if (value.first! <= value.last) return; + final currentVersion = value.first; + final latestVersion = value.last; + if (currentVersion == null || latestVersion == null) return; + if (latestVersion <= currentVersion) return; showDialog( context: context, builder: (context) { diff --git a/pubspec.yaml b/pubspec.yaml index c6bf3531..2e08205f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -15,7 +15,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 2.1.0+9 +version: 2.2.0+10 environment: sdk: ">=2.15.1 <3.0.0"