Skip to content
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

fix: Conditionally display views in subviews #1433

Merged
merged 1 commit into from
May 24, 2024

Conversation

PhilippeWeidmann
Copy link
Member

@PhilippeWeidmann PhilippeWeidmann commented May 24, 2024

On iOS 16.0, SwiftUI seems confused by the if blocks directly in the List. For some reason, moving the condition to the subviews fixes the issue.

To reproduce the issue, use a device/simulator on iOS 16.0 (.0 is important) with a clean DB to start from scratch.

Copy link

sonarcloud bot commented May 24, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link

Found 57 unused code occurences

Expand
Mail/Helpers/MailTargetAssembly.swift:57:7: warning: Class 'MailTargetAssembly' is unused
Mail/Helpers/RichTextEditor.swift:268:10: warning: Function 'moveCursorToEnd(completion:)' is unused
Mail/Helpers/RichTextEditor.swift:272:10: warning: Function 'addBold(completion:)' is unused
Mail/Helpers/RichTextEditor.swift:280:10: warning: Function 'removeList(completion:)' is unused
Mail/MailApp.swift:28:17: warning: Property 'dependencyInjectionHook' is unused
Mail/Utils/IntentViewable.swift:24:9: warning: Property 'resolvedIntent' is unused
Mail/Utils/IntentViewable.swift:25:10: warning: Function 'initFromIntent()' is unused
Mail/Views/AI Writer/Prompt/AIEngineOptionButton.swift:31:18: warning: Property 'isShowingAIEngineChoice' is assigned, but never used
Mail/Views/Menu Drawer/FolderListViewModel.swift:35:17: warning: Property 'foldersObservationToken' is assigned, but never used
Mail/Views/New Message/Attachments/AttachmentsManager.swift:28:21: warning: Protocol 'AttachmentsManageable' is redundant as it's never used as an existential type
Mail/Views/New Message/Attachments/AttachmentsManager.swift:63:62: warning: Protocol 'AttachmentsManageable' conformance is redundant
Mail/Views/New Message/Attachments/AttachmentsManager.swift:63:62: warning: Protocol 'AttachmentsManageable' conformance is redundant
Mail/Views/New Message/Attachments/AttachmentsManager.swift:63:62: warning: Protocol 'AttachmentsManageable' conformance is redundant
Mail/Views/New Message/Recipients/RecipientChip.swift:34:21: warning: Property 'focusedField' is assigned, but never used
Mail/Views/New Message/Select Mailbox/SelectComposeMailboxView.swift:32:18: warning: Property 'composeMessageIntent' is assigned, but never used
Mail/Views/Onboarding/OnboardingView.swift:350:8: warning: Struct 'OnboardingView_Previews' is unused
Mail/Views/Onboarding/SlideView.swift:117:8: warning: Struct 'SlideView_Previews' is unused
Mail/Views/SplitView.swift:66:36: warning: Property 'featureFlagsManageable' is unused
Mail/Views/SplitView.swift:335:51: warning: Parameter 'notification' is unused
Mail/Views/Switch User/AccountListView.swift:39:17: warning: Property 'mailboxObservationToken' is assigned, but never used
Mail/Views/Thread List/FlushFolderView.swift:41:18: warning: Property 'flushAlert' is assigned, but never used
Mail/Views/Thread List/ThreadListHeader.swift:36:17: warning: Property 'folderObservation' is assigned, but never used
Mail/Views/Thread List/UpdateVersionAlertView.swift:30:86: warning: Property 'hasDismissedUpdateVersionView' is unused
Mail/Views/Thread List/UpdateVersionView.swift:28:18: warning: Property 'isShowingUpdateAlert' is assigned, but never used
Mail/Views/Thread/Message/Attachment/AttachmentsView.swift:30:24: warning: Property 'showDocumentPicker' is unused
Mail/Views/Thread/Message/Calendar/CalendarAttendeeAvatarView.swift:29:17: warning: Property 'hasChoice' is unused
Mail/Views/Thread/Message/MessageBodyView.swift:36:18: warning: Property 'displayContentBlockedActionView' is assigned, but never used
Mail/Views/Thread/Message/MessageHeader/MessageHeaderSummaryView.swift:143:8: warning: Struct 'MessageHeaderSummaryView_Previews' is unused
Mail/Views/Thread/Message/MessageView.swift:163:8: warning: Struct 'MessageView_Previews' is unused
Mail/Views/Thread/OpenThreadIntentView.swift:41:13: warning: Property 'threadObservation' is assigned, but never used
MailAppIntentsExtension/MailAppIntentsExtension.swift:24:17: warning: Property 'dependencyInjectionHook' is unused
MailAppIntentsExtension/MailAppIntentsTargetAssembly.swift:22:7: warning: Class 'MailAppIntentsTargetAssembly' is unused
MailAppIntentsExtension/MailSetFocusFilterIntent.swift:27:16: warning: Property 'description' is unused
MailCore/API/MailApiFetcher/MailApiFetcher+AI.swift:25:18: warning: Function 'authenticatedAIRequest(_:method:parameters:)' is unused
MailCore/API/MailError.swift:98:9: warning: Property 'httpStatus' is assigned, but never used
MailCore/Cache/MailboxManager/MailboxManager.swift:28:28: warning: Property 'snackbarPresenter' is unused
MailCore/Models/AI/AIMessage.swift:30:9: warning: Property 'recipient' is assigned, but never used
MailCore/Models/Contact/CommonContact.swift:36:17: warning: Function 'from(contactConfiguration:)' is unused
MailCore/Models/Draft.swift:184:29: warning: Parameter 'isOffline' is unused
MailCore/Models/Message.swift:413:9: warning: Parameter 'safeDisplay' is unused
MailCore/Models/Recipient.swift:33:9: warning: Property 'from' is unused
MailCore/Models/Recipient.swift:36:9: warning: Property 'bcc' is unused
MailCore/Models/Request Body/NewContact.swift:23:13: warning: Property 'value' is assigned, but never used
MailCore/Models/Request Body/NewContact.swift:24:13: warning: Property 'type' is unused
MailCore/Models/Request Body/NewContact.swift:27:9: warning: Property 'firstname' is assigned, but never used
MailCore/Models/Request Body/NewContact.swift:28:9: warning: Property 'lastname' is assigned, but never used
MailCore/Models/Request Body/NewContact.swift:29:9: warning: Property 'emails' is assigned, but never used
MailCore/Models/Request Body/NewContact.swift:30:9: warning: Property 'addressbookId' is assigned, but never used
MailCore/Models/Request Body/NewFolder.swift:22:9: warning: Property 'name' is assigned, but never used
MailCore/Models/Request Body/NewFolder.swift:23:9: warning: Property 'path' is assigned, but never used
MailCore/Utils/IdentifiableURLs.swift:30:8: warning: Struct 'IdentifiableURLComponents' is unused
MailCore/Utils/SnackBar/IKSnackBar+Extension.swift:60:9: warning: Parameter 'anchor' is unused
MailNotificationServiceExtension/NotificationService.swift:31:17: warning: Property 'dependencyInjectionHook' is unused
MailNotificationServiceExtension/NotificationServiceAssembly.swift:27:7: warning: Class 'NotificationServiceTargetAssembly' is unused
MailShareExtension/MailShareExtensionTargetAssembly.swift:22:7: warning: Class 'MailShareExtensionTargetAssembly' is unused
MailShareExtension/Proxy/URLOpener.swift:24:9: warning: Property 'extensionContext' is assigned, but never used
MailShareExtension/ShareViewController.swift:29:17: warning: Property 'dependencyInjectionHook' is unused

@valentinperignon valentinperignon merged commit ce31400 into master May 24, 2024
11 checks passed
@valentinperignon valentinperignon deleted the fix-search-older-versions branch May 24, 2024 12:40
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.

None yet

2 participants