remove dark mode, add dynamic, fix actionmodal import

This commit is contained in:
feruz 2021-07-29 16:51:17 +03:00
parent 731ec8eca1
commit e6ef32d89f
6 changed files with 23 additions and 43 deletions

View File

@ -441,8 +441,6 @@ PODS:
- React-cxxreact (= 0.62.3)
- React-jsi (= 0.62.3)
- ReactCommon/callinvoker (= 0.62.3)
- ReactNativeDarkMode (0.2.2):
- React
- rn-fetch-blob (0.12.0):
- React-Core
- RNCAsyncStorage (1.12.1):
@ -570,7 +568,6 @@ DEPENDENCIES:
- React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`)
- ReactCommon/callinvoker (from `../node_modules/react-native/ReactCommon`)
- ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
- ReactNativeDarkMode (from `../node_modules/react-native-dark-mode`)
- rn-fetch-blob (from `../node_modules/rn-fetch-blob`)
- "RNCAsyncStorage (from `../node_modules/@react-native-community/async-storage`)"
- "RNCPushNotificationIOS (from `../node_modules/@react-native-community/push-notification-ios`)"
@ -713,8 +710,6 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/Libraries/Vibration"
ReactCommon:
:path: "../node_modules/react-native/ReactCommon"
ReactNativeDarkMode:
:path: "../node_modules/react-native-dark-mode"
rn-fetch-blob:
:path: "../node_modules/rn-fetch-blob"
RNCAsyncStorage:
@ -823,7 +818,6 @@ SPEC CHECKSUMS:
React-RCTText: fc8aaead300090f23dd0974545d75e3c43883922
React-RCTVibration: 36a70f1015574284fa6770993c1e83a1f85dbabc
ReactCommon: 3ea86417fa6e432b500579df40b057df54cfb4d4
ReactNativeDarkMode: 0178ffca3b10f6a7c9f49d6f9810232b328fa949
rn-fetch-blob: f065bb7ab7fb48dd002629f8bdcb0336602d3cba
RNCAsyncStorage: b03032fdbdb725bea0bd9e5ec5a7272865ae7398
RNCPushNotificationIOS: 61a7c72bd1ebad3568025957d001e0f0e7b32191

View File

@ -70,8 +70,8 @@
"react-native-animatable": "^1.3.3",
"react-native-autoheight-webview": "^1.5.8",
"react-native-config": "luggit/react-native-config#master",
"react-native-dark-mode": "^0.2.2",
"react-native-date-picker": "^3.2.7",
"react-native-dynamic": "^1.0.0",
"react-native-extended-stylesheet": "^0.10.0",
"react-native-fast-image": "^8.3.2",
"react-native-gesture-handler": "^1.9.0",

View File

@ -2,9 +2,8 @@ import React, { useEffect, useRef, useState } from 'react';
import {AlertButton, ButtonProps } from 'react-native';
import { Source } from 'react-native-fast-image';
import { useSelector, useDispatch } from 'react-redux';
import { ActionModalView } from '..';
import { hideActionModal } from '../../../redux/actions/uiAction';
import { ActionModalRef } from '../view/actionModalView';
import ActionModalView, { ActionModalRef } from '../view/actionModalView';
export interface ActionModalData {
title:string,

View File

@ -10,10 +10,7 @@ import { NavigationActions } from 'react-navigation';
import { bindActionCreators } from 'redux';
import EStyleSheet from 'react-native-extended-stylesheet';
import { isEmpty, some } from 'lodash';
import {
initialMode as nativeThemeInitialMode,
eventEmitter as nativeThemeEventEmitter,
} from 'react-native-dark-mode';
import { useDarkMode } from 'react-native-dynamic';
import messaging from '@react-native-firebase/messaging';
import PushNotification from 'react-native-push-notification';
import VersionNumber from 'react-native-version-number';
@ -149,13 +146,13 @@ class ApplicationContainer extends Component {
AppState.addEventListener('change', this._handleAppStateChange);
setPreviousAppState();
if (nativeThemeEventEmitter) {
/*if (nativeThemeEventEmitter) {
nativeThemeEventEmitter.on('currentModeChanged', (newMode) => {
const { dispatch } = this.props;
dispatch(isDarkTheme(newMode === 'dark'));
});
}
}*/
this._createPushListener();
if (!isIos) BackHandler.addEventListener('hardwareBackPress', this._onBackPress);
@ -724,11 +721,8 @@ class ApplicationContainer extends Component {
const settings = await getSettings();
if (settings) {
dispatch(
isDarkTheme(
settings.isDarkTheme === null ? nativeThemeInitialMode === 'dark' : settings.isDarkTheme,
),
);
const isDarkMode = false; //useDarkMode();
dispatch(isDarkTheme(settings.isDarkTheme === null ? settings.isDarkTheme : isDarkMode));
this.setState({
isThemeReady: true,
});

View File

@ -1,11 +1,11 @@
import React from 'react';
import { View } from 'react-native';
import LottieView from 'lottie-react-native';
import { initialMode as nativeThemeInitialMode } from 'react-native-dark-mode';
import { useDarkMode } from 'react-native-dynamic';
import styles from './launchStyles';
const LaunchScreen = () => (
<View style={nativeThemeInitialMode !== 'dark' ? styles.container : styles.darkContainer}>
<View style={useDarkMode() ? styles.darkContainer : styles.container}>
<LottieView
style={{ width: 150, height: 150 }}
source={require('./animation.json')}

View File

@ -1397,11 +1397,6 @@
resolved "https://registry.yarnpkg.com/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#1ee30d79544ca84d68d4b3cdb0af4f205663dd2d"
integrity sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag==
"@types/events@*":
version "3.0.0"
resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7"
integrity sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==
"@types/hammerjs@^2.0.36":
version "2.0.39"
resolved "https://registry.yarnpkg.com/@types/hammerjs/-/hammerjs-2.0.39.tgz#4be64bbacf3813c79c0dab895c6b0fdc7d5e513f"
@ -1460,10 +1455,10 @@
resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.3.tgz#2ab0d5da2e5815f94b0b9d4b95d1e5f243ab2ca7"
integrity sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw==
"@types/react-native@*":
version "0.63.50"
resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.63.50.tgz#cea13fb272983ec585179807d0cb4f84db0952f6"
integrity sha512-jWxsHDG/AHEaOrqqcI0Cth0WdPsgyaJ1nel5pS0uCzpt2RjwtkvEUAfu39paPr4i+9oUUgbJq3vkVXaj7n8RdQ==
"@types/react-native@>=0.62.0":
version "0.64.12"
resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.64.12.tgz#1c6a3226c26d7a5949cdf8878e6cfe95fe0951d6"
integrity sha512-sw6WGSaL219zqrgdb4kQUtFB9iGXC/LmecLZ+UUWEgwYvD0YH81FqWYmONa2HuTkOFAsxu2bK4DspkWRUHIABQ==
dependencies:
"@types/react" "*"
@ -3793,7 +3788,7 @@ events@^1.1.0:
resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924"
integrity sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=
events@^3.0.0, events@^3.2.0:
events@^3.2.0:
version "3.3.0"
resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400"
integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==
@ -7669,22 +7664,20 @@ react-native-config@luggit/react-native-config#master:
version "1.4.2"
resolved "https://codeload.github.com/luggit/react-native-config/tar.gz/81f599f5f912b84c41c9ef2901faf54995638c4e"
react-native-dark-mode@^0.2.2:
version "0.2.2"
resolved "https://registry.yarnpkg.com/react-native-dark-mode/-/react-native-dark-mode-0.2.2.tgz#4faa335e36330bfca832ba8b3d2bd84c7b880381"
integrity sha512-2vhWOOimU7DRKYjCU/pdv0+JpnGKURq5+c7bre093Jtzk57HtlJfd+ViibbC9Y8zh0viIOyKtfL5mYhVhZ6Crw==
dependencies:
"@types/events" "*"
"@types/react" "*"
"@types/react-native" "*"
events "^3.0.0"
toolkit.ts "^0.0.2"
react-native-date-picker@^3.2.7:
version "3.2.10"
resolved "https://registry.yarnpkg.com/react-native-date-picker/-/react-native-date-picker-3.2.10.tgz#5e690db8e628255d8390e33b1e6f8fa9477f6fb9"
integrity sha512-/fA+htnZcr3rBw3eaOR/DvMwGLDTg59MCiiluin5YcHBxNZQYs/uYp/l6Hf719qZXndPGcixS46YIgso4Jf4gg==
react-native-dynamic@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/react-native-dynamic/-/react-native-dynamic-1.0.0.tgz#d971618fd278cf66acb0add46536aa7a68fd8d4f"
integrity sha512-CMP97GREQ74tpwhKFdUiMpvybzO+dp13Y70rCyu6qzTouOde9vlpDHlxa++o0EA6kXucEW28x3GN0rvZ/1bjrA==
dependencies:
"@types/react" "*"
"@types/react-native" ">=0.62.0"
toolkit.ts "^0.0.2"
react-native-extended-stylesheet@^0.10.0:
version "0.10.0"
resolved "https://registry.yarnpkg.com/react-native-extended-stylesheet/-/react-native-extended-stylesheet-0.10.0.tgz#bc77caf7494dcc67f681128dd8cb5e07dacef9dd"