Skip to content

fix: Crash on showing schedule floating panel macOS #1774

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

Merged
merged 1 commit into from
Apr 29, 2025

Conversation

lebojo
Copy link
Contributor

@lebojo lebojo commented Apr 24, 2025

This PR resolves a crash occurring on macOS when trying to schedule a sending.
The issue was due to platform-specific behavior not being properly handled.

This fix ensures stability across platforms.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a macOS crash when scheduling sends by replacing direct environment access of the mailboxManager with an explicit variable (isMyKSuiteFree) to convey the free status.

  • Added an isMyKSuiteFree parameter to various floating panel and button views.
  • Replaced mailboxManager access in scheduling-related views with the new variable.

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
Mail/Views/Thread/SnoozedThreadHeaderView.swift Added mailboxManager as an environment object and passed its isMyKSuiteFree value.
Mail/Views/Thread/Message/MessageScheduleHeaderView.swift Passed isMyKSuiteFree from mailboxManager to the scheduling modal.
Mail/Views/Schedule/SnoozedFloatingPanel.swift Updated the floating panel modifier to include the isMyKSuiteFree parameter.
Mail/Views/Schedule/ScheduleFloatingPanelView.swift Introduced isMyKSuiteFree as a property and passed it down to the CustomScheduleButton.
Mail/Views/Schedule/ScheduleFloatingPanel.swift Added the isMyKSuiteFree parameter to the modifier and view instantiation.
Mail/Views/Schedule/CustomScheduleButton.swift Replaced usage of mailboxManager with the new isMyKSuiteFree parameter.
Mail/Views/New Message/ComposeMessageView.swift Integrated isMyKSuiteFree into the scheduleFloatingPanel call using mailboxManager values.
Mail/Views/Bottom sheets/Actions/ActionsPanelViewModifier.swift Updated snoozedFloatingPanel to receive the isMyKSuiteFree flag from mailboxManager.

Copy link

Found 2 unused code occurences

Expand
Mail/Views/New Message/ComposeEditor/EditorDesktopToolbarView.swift:29:8: warning: Struct 'EditorDesktopToolbarView' is unused
Mail/Views/Thread List/DraggedEnvelopeView.swift:22:8: warning: Struct 'DraggedEnvelopeView' is unused

@lebojo lebojo force-pushed the fix/macos-app-crash-on-custom-schedule branch from 8fda27f to b7b7b96 Compare April 29, 2025 09:15
@lebojo lebojo changed the title fix: Replace env object to a variable fix: Crash shoing schedule floating panel MACOS Apr 29, 2025
@lebojo lebojo changed the title fix: Crash shoing schedule floating panel MACOS fix: Crash on showing schedule floating panel MACOS Apr 29, 2025
@lebojo lebojo force-pushed the fix/macos-app-crash-on-custom-schedule branch from b7b7b96 to a271806 Compare April 29, 2025 09:17
@valentinperignon valentinperignon changed the title fix: Crash on showing schedule floating panel MACOS fix: Crash on showing schedule floating panel macOS Apr 29, 2025
@valentinperignon valentinperignon force-pushed the fix/macos-app-crash-on-custom-schedule branch from a271806 to 7b30739 Compare April 29, 2025 09:45
Copy link

@valentinperignon valentinperignon merged commit ef5f6e2 into master Apr 29, 2025
10 checks passed
@valentinperignon valentinperignon deleted the fix/macos-app-crash-on-custom-schedule branch April 29, 2025 09:50
@sentry-mobile
Copy link

sentry-mobile bot commented Apr 30, 2025

Sentry Issue: MAIL-IOS-3BEY

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants