diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 0f827ce31..ff7f9f40b 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -529,4 +529,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: d4edbb9c1c57c5484f4893520a7865260cb898d3 -COCOAPODS: 1.8.4 +COCOAPODS: 1.8.3 diff --git a/src/components/posts/view/postsView.js b/src/components/posts/view/postsView.js index f227578fe..9d0d3e1c4 100644 --- a/src/components/posts/view/postsView.js +++ b/src/components/posts/view/postsView.js @@ -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 ( {({ isDarkTheme }) => ( - {filterOptions && isShowFilterBar && ( + {filterOptions && ( { } const settingData = { language: '', - isDarkTheme: false, + isDarkTheme: null, currency: '', notification: true, server: '', diff --git a/src/screens/application/container/applicationContainer.js b/src/screens/application/container/applicationContainer.js index 8543315fa..5f65c7d3c 100644 --- a/src/screens/application/container/applicationContainer.js +++ b/src/screens/application/container/applicationContainer.js @@ -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)); diff --git a/src/screens/application/index.js b/src/screens/application/index.js index f87f443e7..23b0493da 100644 --- a/src/screens/application/index.js +++ b/src/screens/application/index.js @@ -30,6 +30,10 @@ const Application = () => { isThemeReady, isPinCodeRequire, }) => { + if (showAnimation || !isReady || !isRenderRequire || !isThemeReady) { + return ; + } + return ( { isReady={isReady} isDarkTheme={isDarkTheme} /> - {(showAnimation || !isReady || !isRenderRequire || !isThemeReady) && } ); }} diff --git a/src/screens/application/screen/applicationScreen.js b/src/screens/application/screen/applicationScreen.js index 736372bdc..e31c9a16b 100644 --- a/src/screens/application/screen/applicationScreen.js +++ b/src/screens/application/screen/applicationScreen.js @@ -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';