Skip to content

Commit 1736a27

Browse files
authored
feat: disable player auto resize / auto-move (#1394)
Fixes #1386
1 parent 7baf9d2 commit 1736a27

25 files changed

+169
-3
lines changed

lib/app/view/desktop_home_page.dart

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import '../../patch_notes/patch_notes_dialog.dart';
1313
import '../../player/player_model.dart';
1414
import '../../player/view/player_view.dart';
1515
import '../../podcasts/download_model.dart';
16+
import '../../settings/settings_model.dart';
1617
import '../app_model.dart';
1718
import '../connectivity_model.dart';
1819
import 'master_detail_page.dart';
@@ -58,7 +59,11 @@ class _DesktopHomePageState extends State<DesktopHomePage> {
5859

5960
@override
6061
Widget build(BuildContext context) {
61-
final playerToTheRight = context.mediaQuerySize.width > kSideBarThreshHold;
62+
final autoMovePlayer = watchPropertyValue(
63+
(SettingsModel m) => m.autoMovePlayer,
64+
);
65+
final playerToTheRight =
66+
autoMovePlayer && context.mediaQuerySize.width > kSideBarThreshHold;
6267
final isInFullWindowMode = watchPropertyValue(
6368
(AppModel m) => m.fullWindowMode ?? false,
6469
);

lib/extensions/shared_preferences_x.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,5 @@ extension SPKeys on SharedPreferences {
5656
static const podcastLastUpdatedSuffix = '_last_updated';
5757
static const hideCompletedEpisodes = 'hideCompletedEpisodes';
5858
static const showPlayerLyrics = 'showPlayerLyrics';
59+
static const autoMovePlayer = 'autoMovePlayer';
5960
}

lib/l10n/app_en.arb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -803,5 +803,7 @@
803803
}
804804
},
805805
"explore": "Explore",
806-
"favorites": "Favorites"
807-
}
806+
"favorites": "Favorites",
807+
"autoMovePlayerTitle": "Auto move player",
808+
"autoMovePlayerDescription": "Move the player to the right if there is enough horizontal space"
809+
}

lib/l10n/app_localizations.dart

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4422,6 +4422,18 @@ abstract class AppLocalizations {
44224422
/// In en, this message translates to:
44234423
/// **'Favorites'**
44244424
String get favorites;
4425+
4426+
/// No description provided for @autoMovePlayerTitle.
4427+
///
4428+
/// In en, this message translates to:
4429+
/// **'Auto move player'**
4430+
String get autoMovePlayerTitle;
4431+
4432+
/// No description provided for @autoMovePlayerDescription.
4433+
///
4434+
/// In en, this message translates to:
4435+
/// **'Move the player to the right if there is enough horizontal space'**
4436+
String get autoMovePlayerDescription;
44254437
}
44264438

44274439
class _AppLocalizationsDelegate

lib/l10n/app_localizations_cs.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2259,4 +2259,11 @@ class AppLocalizationsCs extends AppLocalizations {
22592259

22602260
@override
22612261
String get favorites => 'Favorites';
2262+
2263+
@override
2264+
String get autoMovePlayerTitle => 'Auto move player';
2265+
2266+
@override
2267+
String get autoMovePlayerDescription =>
2268+
'Move the player to the right if there is enough horizontal space';
22622269
}

lib/l10n/app_localizations_da.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2261,4 +2261,11 @@ class AppLocalizationsDa extends AppLocalizations {
22612261

22622262
@override
22632263
String get favorites => 'Favorites';
2264+
2265+
@override
2266+
String get autoMovePlayerTitle => 'Auto move player';
2267+
2268+
@override
2269+
String get autoMovePlayerDescription =>
2270+
'Move the player to the right if there is enough horizontal space';
22642271
}

lib/l10n/app_localizations_de.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2270,4 +2270,11 @@ class AppLocalizationsDe extends AppLocalizations {
22702270

22712271
@override
22722272
String get favorites => 'Favorites';
2273+
2274+
@override
2275+
String get autoMovePlayerTitle => 'Auto move player';
2276+
2277+
@override
2278+
String get autoMovePlayerDescription =>
2279+
'Move the player to the right if there is enough horizontal space';
22732280
}

lib/l10n/app_localizations_en.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2257,4 +2257,11 @@ class AppLocalizationsEn extends AppLocalizations {
22572257

22582258
@override
22592259
String get favorites => 'Favorites';
2260+
2261+
@override
2262+
String get autoMovePlayerTitle => 'Auto move player';
2263+
2264+
@override
2265+
String get autoMovePlayerDescription =>
2266+
'Move the player to the right if there is enough horizontal space';
22602267
}

lib/l10n/app_localizations_es.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2269,4 +2269,11 @@ class AppLocalizationsEs extends AppLocalizations {
22692269

22702270
@override
22712271
String get favorites => 'Favorites';
2272+
2273+
@override
2274+
String get autoMovePlayerTitle => 'Auto move player';
2275+
2276+
@override
2277+
String get autoMovePlayerDescription =>
2278+
'Move the player to the right if there is enough horizontal space';
22722279
}

lib/l10n/app_localizations_et.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2267,4 +2267,11 @@ class AppLocalizationsEt extends AppLocalizations {
22672267

22682268
@override
22692269
String get favorites => 'Favorites';
2270+
2271+
@override
2272+
String get autoMovePlayerTitle => 'Auto move player';
2273+
2274+
@override
2275+
String get autoMovePlayerDescription =>
2276+
'Move the player to the right if there is enough horizontal space';
22702277
}

0 commit comments

Comments
 (0)