diff --git a/lib/core/dimensions.dart b/lib/core/dimensions.dart index 070398c04..e16515026 100644 --- a/lib/core/dimensions.dart +++ b/lib/core/dimensions.dart @@ -26,7 +26,7 @@ class Dimensions { route == RouteType.SETTINGS_page || // bcz no search route == RouteType.SETTINGS_subpage || // bcz no search route == RouteType.YOUTUBE_PLAYLIST_DOWNLOAD_SUBPAGE || // bcz has fab - (fab == FABType.shuffle && SelectedTracksController.inst.currentAllTracks.isEmpty) || + ((fab == FABType.shuffle || fab == FABType.play) && SelectedTracksController.inst.currentAllTracks.isEmpty) || (settings.selectedLibraryTab.value == LibraryTab.tracks && LibraryTab.tracks.isBarVisible == false); return shouldHide; } diff --git a/lib/core/enums.dart b/lib/core/enums.dart index ee8a9239d..0f5afca47 100644 --- a/lib/core/enums.dart +++ b/lib/core/enums.dart @@ -334,6 +334,7 @@ enum SettingSubpageEnum { enum FABType { none, + play, shuffle, search, } diff --git a/lib/core/namida_converter_ext.dart b/lib/core/namida_converter_ext.dart index f4bb4c877..11741195a 100644 --- a/lib/core/namida_converter_ext.dart +++ b/lib/core/namida_converter_ext.dart @@ -1458,6 +1458,7 @@ class _NamidaConverters { FABType.none: lang.NONE, FABType.search: lang.SEARCH, FABType.shuffle: lang.SHUFFLE, + FABType.play: lang.PLAY, }, YTHomePages: { YTHomePages.home: lang.HOME, @@ -1588,6 +1589,7 @@ class _NamidaConverters { FABType.none: Broken.status, FABType.search: Broken.search_normal, FABType.shuffle: Broken.shuffle, + FABType.play: Broken.play_cricle, }, }; diff --git a/lib/ui/pages/main_page.dart b/lib/ui/pages/main_page.dart index bb8f1ca87..db3a70939 100644 --- a/lib/ui/pages/main_page.dart +++ b/lib/ui/pages/main_page.dart @@ -150,8 +150,8 @@ class MainPage extends StatelessWidget { if (forceSearch || fab == FABType.search) { ScrollSearchController.inst.toggleSearchMenu(); ScrollSearchController.inst.searchBarKey.currentState?.openCloseSearchBar(); - } else if (fab == FABType.shuffle) { - Player.inst.playOrPause(0, SelectedTracksController.inst.currentAllTracks, QueueSource.allTracks, shuffle: true); + } else if (fab == FABType.shuffle || fab == FABType.play) { + Player.inst.playOrPause(0, SelectedTracksController.inst.currentAllTracks, QueueSource.allTracks, shuffle: fab == FABType.shuffle); } }, child: Icon(