forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 139
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
Only call +[NSAppearance currentAppearance] on the main thread #1012
Merged
amgleitman
merged 9 commits into
microsoft:main
from
amgleitman:amgleitman/current-appearance-on-main-thread
Feb 18, 2022
Merged
Only call +[NSAppearance currentAppearance] on the main thread #1012
amgleitman
merged 9 commits into
microsoft:main
from
amgleitman:amgleitman/current-appearance-on-main-thread
Feb 18, 2022
+43
−38
Conversation
This file contains 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
harrieshin
reviewed
Feb 8, 2022
Saadnajmi
reviewed
Feb 8, 2022
harrieshin
reviewed
Feb 8, 2022
tido64
reviewed
Feb 10, 2022
This was referenced Feb 10, 2022
Saadnajmi
reviewed
Feb 15, 2022
Saadnajmi
approved these changes
Feb 18, 2022
harrieshin
approved these changes
Feb 18, 2022
tido64
approved these changes
Feb 18, 2022
Saadnajmi
added a commit
to Saadnajmi/react-native-macos
that referenced
this pull request
Feb 18, 2022
Saadnajmi
added a commit
that referenced
this pull request
Feb 19, 2022
* RCTSwitch: Use NSSwitch instead of NSButton (#924) * add pull yml * match handleOpenURLNotification event payload with iOS (#755) (#2) Co-authored-by: Ryan Linton <[email protected]> * [pull] master from microsoft:master (#11) * Deprecated api (#853) * Remove deprecated/unused context param * Update a few Mac deprecated APIs * Packing RN dependencies, hermes and ignoring javadoc failure, (#852) * Ignore javadoc failure * Bringing few more changes from 0.63-stable * Fixing a patch in engine selection * Fixing a patch in nuget spec * Fixing the output directory of nuget pack * Packaging dependencies in the nuget * Fix onMouseEnter/onMouseLeave callbacks not firing on Pressable (#855) * add pull yml * match handleOpenURLNotification event payload with iOS (#755) (#2) Co-authored-by: Ryan Linton <[email protected]> * fix mouse evetns on pressable * delete extra yml from this branch * Add macOS tags * reorder props to have onMouseEnter/onMouseLeave always be before onPress Co-authored-by: pull[bot] <39814207+pull[bot]@users.noreply.github.com> Co-authored-by: Ryan Linton <[email protected]> * Grammar fixes. (#856) Updates simple grammar issues. Co-authored-by: Nick Trescases <[email protected]> Co-authored-by: Anandraj <[email protected]> Co-authored-by: Saad Najmi <[email protected]> Co-authored-by: pull[bot] <39814207+pull[bot]@users.noreply.github.com> Co-authored-by: Ryan Linton <[email protected]> Co-authored-by: Muhammad Hamza Zaman <[email protected]> * Use NSSwitch * remove change from my fork Co-authored-by: pull[bot] <39814207+pull[bot]@users.noreply.github.com> Co-authored-by: Ryan Linton <[email protected]> Co-authored-by: Nick Trescases <[email protected]> Co-authored-by: Anandraj <[email protected]> Co-authored-by: Muhammad Hamza Zaman <[email protected]> * DynamicColorMacOS fixes (#1028) * Use initWithDynamicProvider + Add HC Support * Update log error * replace all references to 10.14 (#938) * Replace currentAppearance with currentDrawingAppearance on macOS 11+ (#1029) * Manually cherry-pick #1012 Co-authored-by: pull[bot] <39814207+pull[bot]@users.noreply.github.com> Co-authored-by: Ryan Linton <[email protected]> Co-authored-by: Nick Trescases <[email protected]> Co-authored-by: Anandraj <[email protected]> Co-authored-by: Muhammad Hamza Zaman <[email protected]>
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.
Please select one of the following
Summary
If we try to initialize RCTBridge on a background thread, we end up trying to call
+[NSAppearance currentAppearance]
on that same thread as a result of calling-[RCTDevLoadingView isDarkModeEnabled]
. However, when we do this, the Main Thread Checker complains that this is a UI function.To resolve this issue, we ensure that
-[RCTDevLoadingView showOfflineMessage]
, which is making the offending call, does all of its relevant work on the main thread.