-
Notifications
You must be signed in to change notification settings - Fork 57
Fix volume not restoring when pausing during sleep timer fade out #424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ooii
wants to merge
10
commits into
rasmuslos:main
Choose a base branch
from
ooii:fix/restore-volume-on-pause-during-fadeout
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Fix volume not restoring when pausing during sleep timer fade out #424
ooii
wants to merge
10
commits into
rasmuslos:main
from
ooii:fix/restore-volume-on-pause-during-fadeout
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The app was incorrectly entering offline mode even when connections
succeeded. The issue was in loadLibraries() where:
- reduce(true) { $0 && $1 } returns true only when ALL connections succeed
- But the variable was named 'allConnectionsUnavailable' and used to
enable offline mode when true
This caused the app to go offline when connections worked, and stay
online when they failed - exactly backwards.
Fix: Rename to 'anyConnectionSucceeded', use OR reduction, and only
enable offline mode when no connection succeeded.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When ENABLE_CENTRALIZED is not set, the app was using URL.userDirectory which resolves to /Users (the system users folder), not the current user's home directory. This caused permission errors when trying to create download directories: "You don't have permission to save the file in folder..." NSCocoaErrorDomain Code=513 Fix: - downloadDirectoryURL: Use FileManager.urls(for: .documentDirectory) instead of URL.userDirectory, placing downloads in Documents/DownloadV2/ - cacheDirectoryURL: Use FileManager.urls(for: .cachesDirectory) instead of URL.userDirectory, placing cache in Library/Caches/ShelfPlayer/ Both paths are now within the app's sandbox and writable. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implement a toggle in Settings to allow users to disable haptic feedback throughout the app. Previously, haptic feedback was always enabled with no way to turn it off. Changes: - Add 'enableHaptics' preference key (defaults to true) - Create View+SensoryFeedback.swift with conditional hapticFeedback() modifier that wraps SwiftUI's sensoryFeedback() and respects the user preference - Add HapticsPreference.swift toggle component for the settings UI - Add toggle to PreferencesView in the appearance section - Replace all 28 occurrences of .sensoryFeedback() with .hapticFeedback() across 21 view files - Add localized strings for "Haptic feedback" in all supported languages: EN, FR, DE, RU, SV, UK, ZH-Hans When disabled, the hapticFeedback() modifier simply returns the content unchanged, preventing any vibration feedback. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The "action.customize" key was only defined with a comment but had no actual translations, causing the raw key to be displayed in the UI instead of localized text. Added translations for all supported languages: - English: "Customize" - French: "Personnaliser" - German: "Anpassen" - Russian: "Настроить" - Swedish: "Anpassa" - Ukrainian: "Налаштувати" - Chinese (Simplified): "自定义" Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace non-existent 'list.bullet.badge.ellipsis' SF Symbol with 'slider.horizontal.3' which is a valid system symbol that appropriately represents customization/settings functionality. Affected files: - CompactLibraryPicker.swift (2 occurrences) - AudiobookLibraryPanel.swift - PodcastLibraryPanel.swift Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add .keyboardType(.URL) modifier to the server endpoint TextField in ConnectionAddSheet. This presents the URL-optimized keyboard which includes dedicated keys for ".", "/" and ".com" making it easier for users to enter server addresses. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Previously, the "play extends sleep timer" feature used a hardcoded 10-second window. This change adds a user-configurable setting to control how long after the sleep timer expires the user can press play to automatically restart it. Changes: - Add extendSleepTimerOnPlayWindow preference key (default: 10 seconds) - Update AudioPlayer to use the configurable value instead of hardcoded 10 - Add UI controls in SleepTimerEditor: toggle for the feature and stepper for the time window (5-60 seconds in 5-second increments) - Add localized strings for all supported languages (EN, FR, DE, RU, SV, UK, ZH-Hans) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add a new setting that resets the sleep timer to its original duration when the user pauses and resumes playback before the timer expires. This is useful for users who want the timer to restart every time they resume listening. Example: If you set a 10-minute timer and pause after 5 minutes, when you resume the timer will restart at 10 minutes instead of continuing from 5 minutes remaining. Changes: - Add reset computed property to SleepTimerConfiguration that creates a new timer with the same original duration starting from now - Add resetSleepTimerOnPlay preference key (default: false) - Update AudioPlayer.play() to reset active timer when preference is enabled - Add toggle in SleepTimerEditor with descriptive footer - Add localized strings for all supported languages Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When the user paused playback during the sleep timer fade out period, the volume remained at the reduced level instead of being restored to full volume. This fix ensures the volume is reset to audioPlayerVolume when playback is paused during the fade out. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When the resetSleepTimerOnPlay option is enabled, the sleep timer is now properly reset to its initial duration when resuming playback after a pause, instead of adjusting for the pause duration. Additionally, this fix ensures sleepTimerDidExpireAt is properly set when the timer expires, which is required for both resetSleepTimerOnPlay and extendSleepTimerOnPlay features to work correctly. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Test plan
🤖 Generated with Claude Code