[Gekidou] upgrade to RN 68 (old arch) (#6138)

* upgrade to RN 68 (old arch)

* remove test setup unused & commented mock

* Android target set to 30

* Fix theme when opening app from push notification

* upgrade common mark
This commit is contained in:
Elias Nahum
2022-04-08 12:40:44 -04:00
committed by GitHub
parent 9a72837f04
commit b530dbeb09
59 changed files with 3987 additions and 5610 deletions

View File

@@ -8,8 +8,7 @@ import {Appearance, EventSubscription} from 'react-native';
import {Preferences} from '@constants';
import {queryPreferencesByCategoryAndName} from '@queries/servers/preference';
import {observeCurrentTeamId} from '@queries/servers/system';
import EphemeralStore from '@store/ephemeral_store';
import {setNavigationStackStyles, setThemeDefaults} from '@utils/theme';
import {setThemeDefaults, updateThemeIfNeeded} from '@utils/theme';
import type {PreferenceModel} from '@database/models/server';
import type Database from '@nozbe/watermelondb/Database';
@@ -34,15 +33,6 @@ export function getDefaultThemeByAppearance(): Theme {
export const ThemeContext = createContext(getDefaultThemeByAppearance());
const {Consumer, Provider} = ThemeContext;
const updateThemeIfNeeded = (theme: Theme) => {
if (theme !== EphemeralStore.theme) {
EphemeralStore.theme = theme;
requestAnimationFrame(() => {
setNavigationStackStyles(theme);
});
}
};
const ThemeProvider = ({currentTeamId, children, themes}: Props) => {
const getTheme = (): Theme => {
if (currentTeamId) {