mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-30 17:14:22 +03:00
Merge pull request #1421 from esteemapp/bugfix/dark-theme
fixed dark theme issues
This commit is contained in:
commit
a70ed085a6
@ -529,4 +529,4 @@ SPEC CHECKSUMS:
|
||||
|
||||
PODFILE CHECKSUM: d4edbb9c1c57c5484f4893520a7865260cb898d3
|
||||
|
||||
COCOAPODS: 1.8.4
|
||||
COCOAPODS: 1.8.3
|
||||
|
@ -46,11 +46,9 @@ const PostsView = ({
|
||||
const [startPermlink, setStartPermlink] = useState('');
|
||||
const [refreshing, setRefreshing] = useState(false);
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const [isShowFilterBar, setIsShowFilterBar] = useState(true);
|
||||
const [selectedFilterIndex, setSelectedFilterIndex] = useState(selectedOptionIndex || 0);
|
||||
const [isNoPost, setIsNoPost] = useState(false);
|
||||
const [promotedPosts, setPromotedPosts] = useState([]);
|
||||
const [scrollOffsetY, setScrollOffsetY] = useState(0);
|
||||
const [selectedFilterValue, setSelectedFilterValue] = useState(
|
||||
filterOptionsValue && filterOptionsValue[selectedFilterIndex],
|
||||
);
|
||||
@ -333,22 +331,17 @@ const PostsView = ({
|
||||
);
|
||||
};
|
||||
|
||||
const _handleOnScroll = event => {
|
||||
const currentOffset = event.nativeEvent.contentOffset.y;
|
||||
|
||||
const _handleOnScroll = () => {
|
||||
if (handleOnScroll) {
|
||||
handleOnScroll();
|
||||
}
|
||||
|
||||
setScrollOffsetY(currentOffset);
|
||||
setIsShowFilterBar(scrollOffsetY > currentOffset || scrollOffsetY <= 0);
|
||||
};
|
||||
|
||||
return (
|
||||
<ThemeContainer>
|
||||
{({ isDarkTheme }) => (
|
||||
<View style={styles.container}>
|
||||
{filterOptions && isShowFilterBar && (
|
||||
{filterOptions && (
|
||||
<FilterBar
|
||||
dropdownIconName="arrow-drop-down"
|
||||
//options={filterOptions}
|
||||
|
@ -464,7 +464,7 @@ export const getSettings = async () => {
|
||||
}
|
||||
const settingData = {
|
||||
language: '',
|
||||
isDarkTheme: false,
|
||||
isDarkTheme: null,
|
||||
currency: '',
|
||||
notification: true,
|
||||
server: '',
|
||||
|
@ -462,7 +462,11 @@ class ApplicationContainer extends Component {
|
||||
const settings = await getSettings();
|
||||
|
||||
if (settings) {
|
||||
dispatch(isDarkTheme(nativeThemeInitialMode === 'dark' || settings.isDarkTheme));
|
||||
dispatch(
|
||||
isDarkTheme(
|
||||
settings.isDarkTheme === null ? nativeThemeInitialMode === 'dark' : settings.isDarkTheme,
|
||||
),
|
||||
);
|
||||
if (settings.isPinCodeOpen !== '') dispatch(isPinCodeOpen(settings.isPinCodeOpen));
|
||||
if (settings.language !== '') dispatch(setLanguage(settings.language));
|
||||
if (settings.server !== '') dispatch(setApi(settings.server));
|
||||
|
@ -30,6 +30,10 @@ const Application = () => {
|
||||
isThemeReady,
|
||||
isPinCodeRequire,
|
||||
}) => {
|
||||
if (showAnimation || !isReady || !isRenderRequire || !isThemeReady) {
|
||||
return <Launch />;
|
||||
}
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
<Modal
|
||||
@ -47,7 +51,6 @@ const Application = () => {
|
||||
isReady={isReady}
|
||||
isDarkTheme={isDarkTheme}
|
||||
/>
|
||||
{(showAnimation || !isReady || !isRenderRequire || !isThemeReady) && <Launch />}
|
||||
</Fragment>
|
||||
);
|
||||
}}
|
||||
|
@ -5,7 +5,7 @@ import { connect } from 'react-redux';
|
||||
import { createAppContainer } from 'react-navigation';
|
||||
|
||||
import AppNavitation from '../../../navigation/routes';
|
||||
import { setTopLevelNavigator } from '../../../navigation/service';
|
||||
import { setTopLevelNavigator, navigate } from '../../../navigation/service';
|
||||
|
||||
// Services
|
||||
import { toastNotification as toastNotificationAction } from '../../../redux/actions/uiAction';
|
||||
|
Loading…
Reference in New Issue
Block a user