Skip to content

Commit

Permalink
fix: fix play config
Browse files Browse the repository at this point in the history
  • Loading branch information
0xHexE committed Jan 10, 2025
1 parent 9952f07 commit 356f197
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/features/settings/screen/playback_settings_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,12 @@ class _PlaybackSettingsScreenState extends State<PlaybackSettingsScreen> {
}

void _loadPlaybackSettings() {
final playbackConfig = getPlaybackConfig();
PlaybackConfig playbackConfig;
try {
playbackConfig = getPlaybackConfig();
} catch (e) {
playbackConfig = PlaybackConfig.fromJson({});
}

_autoPlay = playbackConfig.autoPlay ?? true;
_playbackSpeed = playbackConfig.playbackSpeed.toDouble();
Expand Down

0 comments on commit 356f197

Please sign in to comment.