mirror of
https://github.com/ecency/ecency-mobile.git
synced 2025-01-02 10:54:59 +03:00
fixed dark theme issues
This commit is contained in:
parent
09ad24f8ca
commit
adccb053ca
@ -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],
|
||||
);
|
||||
@ -339,16 +337,13 @@ const PostsView = ({
|
||||
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>
|
||||
);
|
||||
}}
|
||||
|
Loading…
Reference in New Issue
Block a user