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 appearance changed into wrong activity #34

Conversation

Kudo
Copy link

@Kudo Kudo commented Jan 23, 2024

Why

fixes expo/expo#26556
close ENG-11171

How

the original AppCompatDelegate.setDefaultNightMode() is a global setup. when changing the night mode, it will actually call HomeActivity's onConfigurationChanged. this pr tries to set night mode to current activity by using the setLocalNightMode()

Test Plan

unversioned expo-go with repro from expo/expo#26556

Copy link

linear bot commented Jan 23, 2024

@Kudo Kudo merged commit cf55a59 into exp-latest Jan 23, 2024
2 checks passed
@Kudo Kudo deleted the @kudo/eng-11171-appearance-setcolorscheme-does-not-work-on-android branch January 23, 2024 10:20
Kudo added a commit that referenced this pull request Jan 23, 2024
the original `AppCompatDelegate.setDefaultNightMode()` is a global setup. when changing the night mode, it will actually call HomeActivity's `onConfigurationChanged`. this pr tries to set night mode to current activity by using the `setLocalNightMode()`

(cherry picked from commit cf55a59)
@Kudo Kudo mentioned this pull request Jan 23, 2024
2 tasks
Kudo added a commit to expo/expo that referenced this pull request Jan 23, 2024
# Why

fixes #26556
fixes #26561
close ENG-11171
close ENG-11173

# How

- the #26556 appearance issue was resolved by
expo/react-native#34. i've cherry-picked the fix
to both sdk-49 and sdk-50 branch of react-native-lab fork.
- the #26561 was coming from incompatible fresco versions. since fresco
was bumped from react-native 0.73, we should re-version sdk-49 aar with
new fresco. here's what i did

# Test Plan

tested on the local versioned release build expo-go
- #26556 for both sdk-49 and sdk-50
- #26561 doesn't have a repro but i can copy a repro from
https://github.com/jobtoday/react-native-image-viewing/tree/master/example
gabrieldonadel pushed a commit that referenced this pull request Jan 29, 2024
the original `AppCompatDelegate.setDefaultNightMode()` is a global setup. when changing the night mode, it will actually call HomeActivity's `onConfigurationChanged`. this pr tries to set night mode to current activity by using the `setLocalNightMode()`
gabrieldonadel pushed a commit that referenced this pull request Feb 6, 2024
the original `AppCompatDelegate.setDefaultNightMode()` is a global setup. when changing the night mode, it will actually call HomeActivity's `onConfigurationChanged`. this pr tries to set night mode to current activity by using the `setLocalNightMode()`
gabrieldonadel pushed a commit that referenced this pull request Mar 7, 2024
the original `AppCompatDelegate.setDefaultNightMode()` is a global setup. when changing the night mode, it will actually call HomeActivity's `onConfigurationChanged`. this pr tries to set night mode to current activity by using the `setLocalNightMode()`
gabrieldonadel pushed a commit that referenced this pull request Mar 13, 2024
the original `AppCompatDelegate.setDefaultNightMode()` is a global setup. when changing the night mode, it will actually call HomeActivity's `onConfigurationChanged`. this pr tries to set night mode to current activity by using the `setLocalNightMode()`
alanjhughes pushed a commit that referenced this pull request Mar 21, 2024
the original `AppCompatDelegate.setDefaultNightMode()` is a global setup. when changing the night mode, it will actually call HomeActivity's `onConfigurationChanged`. this pr tries to set night mode to current activity by using the `setLocalNightMode()`
alanjhughes pushed a commit that referenced this pull request Mar 27, 2024
the original `AppCompatDelegate.setDefaultNightMode()` is a global setup. when changing the night mode, it will actually call HomeActivity's `onConfigurationChanged`. this pr tries to set night mode to current activity by using the `setLocalNightMode()`
alanjhughes pushed a commit that referenced this pull request Apr 2, 2024
the original `AppCompatDelegate.setDefaultNightMode()` is a global setup. when changing the night mode, it will actually call HomeActivity's `onConfigurationChanged`. this pr tries to set night mode to current activity by using the `setLocalNightMode()`
alanjhughes pushed a commit that referenced this pull request Apr 8, 2024
the original `AppCompatDelegate.setDefaultNightMode()` is a global setup. when changing the night mode, it will actually call HomeActivity's `onConfigurationChanged`. this pr tries to set night mode to current activity by using the `setLocalNightMode()`
alanjhughes pushed a commit that referenced this pull request Apr 11, 2024
the original `AppCompatDelegate.setDefaultNightMode()` is a global setup. when changing the night mode, it will actually call HomeActivity's `onConfigurationChanged`. this pr tries to set night mode to current activity by using the `setLocalNightMode()`
alanjhughes pushed a commit that referenced this pull request Apr 15, 2024
the original `AppCompatDelegate.setDefaultNightMode()` is a global setup. when changing the night mode, it will actually call HomeActivity's `onConfigurationChanged`. this pr tries to set night mode to current activity by using the `setLocalNightMode()`
alanjhughes pushed a commit that referenced this pull request Apr 22, 2024
the original `AppCompatDelegate.setDefaultNightMode()` is a global setup. when changing the night mode, it will actually call HomeActivity's `onConfigurationChanged`. this pr tries to set night mode to current activity by using the `setLocalNightMode()`
alanjhughes pushed a commit that referenced this pull request May 1, 2024
the original `AppCompatDelegate.setDefaultNightMode()` is a global setup. when changing the night mode, it will actually call HomeActivity's `onConfigurationChanged`. this pr tries to set night mode to current activity by using the `setLocalNightMode()`
alanjhughes pushed a commit that referenced this pull request May 2, 2024
the original `AppCompatDelegate.setDefaultNightMode()` is a global setup. when changing the night mode, it will actually call HomeActivity's `onConfigurationChanged`. this pr tries to set night mode to current activity by using the `setLocalNightMode()`
alanjhughes pushed a commit that referenced this pull request Jun 4, 2024
the original `AppCompatDelegate.setDefaultNightMode()` is a global setup. when changing the night mode, it will actually call HomeActivity's `onConfigurationChanged`. this pr tries to set night mode to current activity by using the `setLocalNightMode()`
gabrieldonadel pushed a commit that referenced this pull request Jul 2, 2024
the original `AppCompatDelegate.setDefaultNightMode()` is a global setup. when changing the night mode, it will actually call HomeActivity's `onConfigurationChanged`. this pr tries to set night mode to current activity by using the `setLocalNightMode()`
gabrieldonadel pushed a commit that referenced this pull request Jul 17, 2024
the original `AppCompatDelegate.setDefaultNightMode()` is a global setup. when changing the night mode, it will actually call HomeActivity's `onConfigurationChanged`. this pr tries to set night mode to current activity by using the `setLocalNightMode()`
gabrieldonadel pushed a commit that referenced this pull request Jul 17, 2024
the original `AppCompatDelegate.setDefaultNightMode()` is a global setup. when changing the night mode, it will actually call HomeActivity's `onConfigurationChanged`. this pr tries to set night mode to current activity by using the `setLocalNightMode()`
gabrieldonadel pushed a commit that referenced this pull request Aug 5, 2024
the original `AppCompatDelegate.setDefaultNightMode()` is a global setup. when changing the night mode, it will actually call HomeActivity's `onConfigurationChanged`. this pr tries to set night mode to current activity by using the `setLocalNightMode()`
gabrieldonadel pushed a commit that referenced this pull request Aug 16, 2024
the original `AppCompatDelegate.setDefaultNightMode()` is a global setup. when changing the night mode, it will actually call HomeActivity's `onConfigurationChanged`. this pr tries to set night mode to current activity by using the `setLocalNightMode()`
gabrieldonadel pushed a commit that referenced this pull request Aug 22, 2024
the original `AppCompatDelegate.setDefaultNightMode()` is a global setup. when changing the night mode, it will actually call HomeActivity's `onConfigurationChanged`. this pr tries to set night mode to current activity by using the `setLocalNightMode()`
gabrieldonadel pushed a commit that referenced this pull request Oct 8, 2024
the original `AppCompatDelegate.setDefaultNightMode()` is a global setup. when changing the night mode, it will actually call HomeActivity's `onConfigurationChanged`. this pr tries to set night mode to current activity by using the `setLocalNightMode()`
gabrieldonadel pushed a commit that referenced this pull request Oct 10, 2024
the original `AppCompatDelegate.setDefaultNightMode()` is a global setup. when changing the night mode, it will actually call HomeActivity's `onConfigurationChanged`. this pr tries to set night mode to current activity by using the `setLocalNightMode()`
gabrieldonadel pushed a commit that referenced this pull request Oct 16, 2024
the original `AppCompatDelegate.setDefaultNightMode()` is a global setup. when changing the night mode, it will actually call HomeActivity's `onConfigurationChanged`. this pr tries to set night mode to current activity by using the `setLocalNightMode()`
gabrieldonadel pushed a commit that referenced this pull request Oct 17, 2024
the original `AppCompatDelegate.setDefaultNightMode()` is a global setup. when changing the night mode, it will actually call HomeActivity's `onConfigurationChanged`. this pr tries to set night mode to current activity by using the `setLocalNightMode()`
gabrieldonadel pushed a commit that referenced this pull request Oct 23, 2024
the original `AppCompatDelegate.setDefaultNightMode()` is a global setup. when changing the night mode, it will actually call HomeActivity's `onConfigurationChanged`. this pr tries to set night mode to current activity by using the `setLocalNightMode()`
gabrieldonadel pushed a commit that referenced this pull request Oct 29, 2024
the original `AppCompatDelegate.setDefaultNightMode()` is a global setup. when changing the night mode, it will actually call HomeActivity's `onConfigurationChanged`. this pr tries to set night mode to current activity by using the `setLocalNightMode()`
gabrieldonadel pushed a commit that referenced this pull request Nov 14, 2024
the original `AppCompatDelegate.setDefaultNightMode()` is a global setup. when changing the night mode, it will actually call HomeActivity's `onConfigurationChanged`. this pr tries to set night mode to current activity by using the `setLocalNightMode()`
gabrieldonadel pushed a commit that referenced this pull request Nov 22, 2024
the original `AppCompatDelegate.setDefaultNightMode()` is a global setup. when changing the night mode, it will actually call HomeActivity's `onConfigurationChanged`. this pr tries to set night mode to current activity by using the `setLocalNightMode()`
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.

Appearance setColorScheme does not work on Android
2 participants