Skip to content

Commit

Permalink
Merge pull request #1885 from KRTirtho/dev
Browse files Browse the repository at this point in the history
chore: release v3.8.1
  • Loading branch information
KRTirtho authored Sep 15, 2024
2 parents 9b02412 + 5ac5346 commit 87a7854
Show file tree
Hide file tree
Showing 88 changed files with 1,190 additions and 768 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/spotube-publish-binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
inputs:
version:
description: Version to publish (x.x.x)
default: 3.8.0
default: 3.8.1
required: true
dry_run:
description: Dry run
Expand Down Expand Up @@ -76,12 +76,12 @@ jobs:
commit_message: Updated to v${{ inputs.version }}

winget:
runs-on: windows-latest
runs-on: ubuntu-latest
if: contains(inputs.jobs, 'winget')
steps:
- name: Release winget package
if: ${{ !inputs.dry_run }}
uses: vedantmgoyal2009/winget-releaser@v2
uses: vedantmgoyal9/winget-releaser@main
with:
version: ${{ inputs.version }}
release-tag: v${{ inputs.version }}
Expand Down Expand Up @@ -134,4 +134,4 @@ jobs:
packageName: oss.krtirtho.spotube
track: production
status: draft
releaseName: ${{ env.TAG_NAME }}
releaseName: ${{ env.TAG_NAME }}
11 changes: 9 additions & 2 deletions .github/workflows/spotube-release-binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,15 @@ jobs:
- name: Unessary hosted tools
if: ${{matrix.platform == 'linux_arm'}}
run: |
sudo rm -rf /usr/share/dotnet
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
swap-storage: false
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true

- name: Build ${{matrix.platform}} binaries
run: dart cli/cli.dart build ${{matrix.platform}}
Expand Down
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,33 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [3.8.1](https://github.com/krtirtho/spotube/compare/v3.8.0...v3.8.1) (2024-09-15)

## Changes

### Bug Fixes

- **translations**: correct some basque incorrect translations (#1815)
- **lyrics**: LRCLIB lyrics should be usable without logging in #1803
- playlist displaying descriptions unescaped html #1784
- **android**: pressing back while the player is open doesn't take to previous page
- handle dublicated items in playback queue correctly #1852
- **desktop**: scrollbar overlapping with more options of tracks and playlists
- **discord**: stop discord rpc from try update presence when not connected
- **stats**: minutes page shows plays and streams page shows minutes which should be the opposite #1880
- **android**: clears queue upon swiping away notification
- **player**: shuffle button state resets after closing page #1657
- getting started page login page exception #1800
- **mobile**: queue doesn't persist
- local tracks takes time to load
- start radio not working #1629

### Features

- **desktop**: show error dialog if webview is not found on login #1871
- manually detect and define touch behavior #1763


## [3.8.0](https://github.com/krtirtho/spotube/compare/v3.7.1...v3.8.0) (2024-06-06)

### Features
Expand Down
Binary file added assets/spotube-logo.bmp
Binary file not shown.
6 changes: 0 additions & 6 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ PODS:
- flutter_inappwebview_ios/Core (0.0.1):
- Flutter
- OrderedSet (~> 5.0)
- flutter_keyboard_visibility (0.0.1):
- Flutter
- flutter_native_splash (0.0.1):
- Flutter
- flutter_secure_storage (6.0.0):
Expand Down Expand Up @@ -124,7 +122,6 @@ DEPENDENCIES:
- flutter_broadcasts (from `.symlinks/plugins/flutter_broadcasts/ios`)
- flutter_discord_rpc (from `.symlinks/plugins/flutter_discord_rpc/ios`)
- flutter_inappwebview_ios (from `.symlinks/plugins/flutter_inappwebview_ios/ios`)
- flutter_keyboard_visibility (from `.symlinks/plugins/flutter_keyboard_visibility/ios`)
- flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
- flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`)
- flutter_sharing_intent (from `.symlinks/plugins/flutter_sharing_intent/ios`)
Expand Down Expand Up @@ -173,8 +170,6 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/flutter_discord_rpc/ios"
flutter_inappwebview_ios:
:path: ".symlinks/plugins/flutter_inappwebview_ios/ios"
flutter_keyboard_visibility:
:path: ".symlinks/plugins/flutter_keyboard_visibility/ios"
flutter_native_splash:
:path: ".symlinks/plugins/flutter_native_splash/ios"
flutter_secure_storage:
Expand Down Expand Up @@ -220,7 +215,6 @@ SPEC CHECKSUMS:
flutter_broadcasts: 3ece15b27d8ccbe2132c3df303e7c3401feab882
flutter_discord_rpc: e1c342f29ceb9dd76cdc01db59a70c93bb4d9ec5
flutter_inappwebview_ios: 97215cf7d4677db55df76782dbd2930c5e1c1ea0
flutter_keyboard_visibility: 0339d06371254c3eb25eeb90ba8d17dca8f9c069
flutter_native_splash: edf599c81f74d093a4daf8e17bd7a018854bc778
flutter_secure_storage: 23fc622d89d073675f2eaa109381aefbcf5a49be
flutter_sharing_intent: e35380d0e1501d7111dbb7e46d5ac6339da6da98
Expand Down
104 changes: 104 additions & 0 deletions lib/components/framework/app_pop_scope.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
import 'dart:io';

import 'package:flutter/material.dart';

/// A temporary workaround for [WillPopScope] and [PopScope] not working in GoRouter
/// https://github.com/flutter/flutter/issues/140869#issuecomment-2247181468
class AppPopScope extends StatefulWidget {
final Widget child;

final PopInvokedCallback? onPopInvoked;

final bool canPop;

const AppPopScope({
super.key,
required this.child,
this.canPop = true,
this.onPopInvoked,
});

@override
State<AppPopScope> createState() => _AppPopScopeState();
}

class _AppPopScopeState extends State<AppPopScope> {
final bool _enable = Platform.isAndroid;
ModalRoute? _route;
BackButtonDispatcher? _parentBackBtnDispatcher;
ChildBackButtonDispatcher? _backBtnDispatcher;

@override
void didChangeDependencies() {
super.didChangeDependencies();
_route = ModalRoute.of(context);
_updateBackButtonDispatcher();
}

@override
void activate() {
super.activate();
_updateBackButtonDispatcher();
}

@override
void deactivate() {
super.deactivate();
_disposeBackBtnDispatcher();
}

@override
void dispose() {
_disposeBackBtnDispatcher();
super.dispose();
}

@override
Widget build(BuildContext context) {
return PopScope(
canPop: widget.canPop,
onPopInvoked: widget.onPopInvoked,
child: widget.child,
);
}

void _updateBackButtonDispatcher() {
if (!_enable) return;

var dispatcher = Router.maybeOf(context)?.backButtonDispatcher;
if (dispatcher != _parentBackBtnDispatcher) {
_disposeBackBtnDispatcher();
_parentBackBtnDispatcher = dispatcher;
if (dispatcher is BackButtonDispatcher &&
dispatcher is! ChildBackButtonDispatcher) {
dispatcher = dispatcher.createChildBackButtonDispatcher();
}
_backBtnDispatcher = dispatcher as ChildBackButtonDispatcher;
}
_backBtnDispatcher?.removeCallback(_handleBackButton);
_backBtnDispatcher?.addCallback(_handleBackButton);
_backBtnDispatcher?.takePriority();
}

void _disposeBackBtnDispatcher() {
_backBtnDispatcher?.removeCallback(_handleBackButton);
if (_backBtnDispatcher is ChildBackButtonDispatcher) {
final child = _backBtnDispatcher as ChildBackButtonDispatcher;
_parentBackBtnDispatcher?.forget(child);
}
_backBtnDispatcher = null;
_parentBackBtnDispatcher = null;
}

bool get _onlyRoute => _route != null && _route!.isFirst && _route!.isCurrent;

Future<bool> _handleBackButton() async {
if (_onlyRoute) {
widget.onPopInvoked?.call(widget.canPop);
if (!widget.canPop) {
return true;
}
}
return false;
}
}
20 changes: 12 additions & 8 deletions lib/components/panels/controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,29 +41,33 @@ class PanelController extends ChangeNotifier {
bool get isAttached => _panelState != null;

/// Closes the sliding panel to its collapsed state (i.e. to the minHeight)
Future<void> close() {
Future<void> close() async {
assert(isAttached, "PanelController must be attached to a SlidingUpPanel");
return _panelState!._close();
await _panelState!._close();
notifyListeners();
}

/// Opens the sliding panel fully
/// (i.e. to the maxHeight)
Future<void> open() {
Future<void> open() async {
assert(isAttached, "PanelController must be attached to a SlidingUpPanel");
return _panelState!._open();
await _panelState!._open();
notifyListeners();
}

/// Hides the sliding panel (i.e. is invisible)
Future<void> hide() {
Future<void> hide() async {
assert(isAttached, "PanelController must be attached to a SlidingUpPanel");
return _panelState!._hide();
await _panelState!._hide();
notifyListeners();
}

/// Shows the sliding panel in its collapsed state
/// (i.e. "un-hide" the sliding panel)
Future<void> show() {
Future<void> show() async {
assert(isAttached, "PanelController must be attached to a SlidingUpPanel");
return _panelState!._show();
await _panelState!._show();
notifyListeners();
}

/// Animates the panel position to the value.
Expand Down
2 changes: 1 addition & 1 deletion lib/components/playbutton_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class PlaybuttonCard extends HookWidget {
others: 15,
);

var unescapeHtml = description?.unescapeHtml();
final unescapeHtml = description?.unescapeHtml().cleanHtml();
return Container(
constraints: BoxConstraints(maxWidth: size),
margin: margin,
Expand Down
4 changes: 3 additions & 1 deletion lib/components/track_tile/track_options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ class TrackOptions extends HookConsumerWidget {
final pages =
await spotify.search.get(query, types: [SearchType.playlist]).first();

final radios = pages.map((e) => e.items).toList().cast<PlaylistSimple>();
final radios = pages
.expand((e) => e.items?.cast<PlaylistSimple>().toList() ?? [])
.toList();

final artists = track.artists!.map((e) => e.name);

Expand Down
3 changes: 3 additions & 0 deletions lib/components/track_tile/track_tile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'dart:async';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:gap/gap.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:skeletonizer/skeletonizer.dart';
import 'package:spotify/spotify.dart';
Expand All @@ -21,6 +22,7 @@ import 'package:spotube/pages/track/track.dart';
import 'package:spotube/provider/audio_player/querying_track_info.dart';
import 'package:spotube/provider/audio_player/state.dart';
import 'package:spotube/provider/blacklist_provider.dart';
import 'package:spotube/utils/platform.dart';
import 'package:spotube/utils/service_utils.dart';

class TrackTile extends HookConsumerWidget {
Expand Down Expand Up @@ -276,6 +278,7 @@ class TrackTile extends HookConsumerWidget {
userPlaylist: userPlaylist,
showMenuCbRef: showOptionCbRef,
),
if (kIsDesktop) const Gap(10),
],
),
),
Expand Down
Loading

0 comments on commit 87a7854

Please sign in to comment.