mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-18 10:52:16 +03:00
discarded modal presentation, updated bottom sliding back icons
This commit is contained in:
parent
1f83d1edd9
commit
65cef59c08
@ -9,7 +9,12 @@ import { setHidePostsThumbnails } from '../../../redux/actions/applicationAction
|
||||
// Components
|
||||
import BasicHeaderView from '../view/basicHeaderView';
|
||||
|
||||
const BasicHeaderContainer = (props) => {
|
||||
|
||||
interface BackHeaderProps {
|
||||
backIconName:'close'|'arrow-back';
|
||||
}
|
||||
|
||||
const BasicHeaderContainer = (props:BackHeaderProps) => {
|
||||
const dispatch = useAppDispatch();
|
||||
const isHideImages = useAppSelector((state) => state.application.hidePostsThumbnails);
|
||||
|
@ -45,6 +45,7 @@ const BasicHeaderView = ({
|
||||
handleRewardChange,
|
||||
enableViewModeToggle,
|
||||
handleSettingsPress,
|
||||
backIconName,
|
||||
}) => {
|
||||
|
||||
const [isInputVisible, setIsInputVisible] = useState(false);
|
||||
@ -112,7 +113,7 @@ const BasicHeaderView = ({
|
||||
<IconButton
|
||||
iconStyle={[styles.backIcon, isModalHeader && styles.closeIcon]}
|
||||
iconType="MaterialIcons"
|
||||
name="arrow-back"
|
||||
name={backIconName || 'arrow-back'}
|
||||
onPress={() => (isModalHeader ? handleOnPressClose() : handleOnPressBackButton())}
|
||||
disabled={disabled}
|
||||
/>
|
||||
|
@ -36,7 +36,6 @@ import { DrawerNavigator } from './drawerNavigator';
|
||||
|
||||
const Stack = createNativeStackNavigator();
|
||||
|
||||
|
||||
export const StackNavigator = () => {
|
||||
|
||||
return (
|
||||
@ -61,21 +60,18 @@ export const StackNavigator = () => {
|
||||
<Stack.Screen name={ROUTES.SCREENS.COIN_DETAILS} component={CoinDetails} />
|
||||
<Stack.Screen name={ROUTES.SCREENS.EDIT_HISTORY} component={EditHistoryScreen} />
|
||||
<Stack.Screen name={ROUTES.SCREENS.POST} component={Post} />
|
||||
|
||||
</Stack.Group>
|
||||
<Stack.Group screenOptions={{ presentation: 'modal' }}>
|
||||
<Stack.Group screenOptions={{ animation: 'slide_from_bottom' }}>
|
||||
<Stack.Screen name={ROUTES.SCREENS.REBLOGS} component={Reblogs} />
|
||||
<Stack.Screen name={ROUTES.SCREENS.VOTERS} component={Voters} />
|
||||
<Stack.Screen name={ROUTES.SCREENS.FOLLOWS} component={Follows} />
|
||||
|
||||
</Stack.Group>
|
||||
<Stack.Group screenOptions={{ animation: 'slide_from_bottom' }}>
|
||||
<Stack.Screen name={ROUTES.SCREENS.TRANSFER} component={Transfer} />
|
||||
<Stack.Screen name={ROUTES.SCREENS.EDITOR} component={Editor} />
|
||||
<Stack.Screen name={ROUTES.SCREENS.REGISTER} component={Register} />
|
||||
<Stack.Screen name={ROUTES.SCREENS.LOGIN} component={Login} />
|
||||
</Stack.Group>
|
||||
|
||||
|
||||
</Stack.Navigator>
|
||||
)
|
||||
}
|
||||
|
@ -6,7 +6,6 @@ import get from 'lodash/get';
|
||||
// Utilities
|
||||
|
||||
// Services and Actions
|
||||
import { withNavigation } from '@react-navigation/compat';
|
||||
import { getFollowers, getFollowing, getFollowSearch } from '../../../providers/hive/dhive';
|
||||
// Component
|
||||
import FollowsScreen from '../screen/followsScreen';
|
||||
|
@ -61,7 +61,12 @@ class FollowsScreen extends PureComponent {
|
||||
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<BasicHeader title={headerTitle} isHasSearch handleOnSearch={handleSearch} />
|
||||
<BasicHeader
|
||||
title={headerTitle}
|
||||
isHasSearch
|
||||
backIconName="close"
|
||||
handleOnSearch={handleSearch}
|
||||
/>
|
||||
<FlatList
|
||||
data={data}
|
||||
keyExtractor={(item, index) => index.toString()}
|
||||
|
@ -39,6 +39,7 @@ const ReblogScreen = ({ navigation, route }) => {
|
||||
<SafeAreaView style={[globalStyles.container, { paddingBottom: 40 }]}>
|
||||
<BasicHeader
|
||||
title={`${headerTitle} (${data && data.length})`}
|
||||
backIconName="close"
|
||||
isHasSearch
|
||||
handleOnSearch={(text) => handleSearch(text, 'account')}
|
||||
/>
|
||||
|
@ -27,7 +27,10 @@ const AddressView = ({
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
<BasicHeader title={intl.formatMessage({ id: `transfer.${transferType}` })} />
|
||||
<BasicHeader
|
||||
title={intl.formatMessage({ id: `transfer.${transferType}` })}
|
||||
backIconName="close"
|
||||
/>
|
||||
<View style={styles.container}>
|
||||
<ScrollView>
|
||||
{accountType !== 'postingKey' &&
|
||||
|
@ -575,7 +575,7 @@ class DelegateScreen extends Component {
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
<BasicHeader title={intl.formatMessage({ id: 'transfer.delegate' })} />
|
||||
<BasicHeader title={intl.formatMessage({ id: 'transfer.delegate' })} backIconName="close" />
|
||||
<KeyboardAvoidingView
|
||||
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
|
||||
style={styles.fillSpace}
|
||||
|
@ -464,7 +464,10 @@ class PowerDownView extends Component {
|
||||
);
|
||||
return (
|
||||
<Fragment>
|
||||
<BasicHeader title={intl.formatMessage({ id: `transfer.${transferType}` })} />
|
||||
<BasicHeader
|
||||
title={intl.formatMessage({ id: `transfer.${transferType}` })}
|
||||
backIconName="close"
|
||||
/>
|
||||
<KeyboardAvoidingView
|
||||
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
|
||||
style={styles.powerDownKeyboadrAvoidingContainer}
|
||||
|
@ -128,7 +128,10 @@ const TransferView = ({
|
||||
}
|
||||
return (
|
||||
<Fragment>
|
||||
<BasicHeader title={intl.formatMessage({ id: `transfer.${transferType}` })} />
|
||||
<BasicHeader
|
||||
title={intl.formatMessage({ id: `transfer.${transferType}` })}
|
||||
backIconName="close"
|
||||
/>
|
||||
|
||||
<KeyboardAwareScrollView
|
||||
keyboardShouldPersistTaps
|
||||
|
@ -15,12 +15,11 @@ import { getResizedAvatar } from '../../../utils/image';
|
||||
|
||||
const filterOptions = ['rewards', 'percent', 'time'];
|
||||
|
||||
const VotersScreen = ({ route, navigation }) => {
|
||||
const VotersScreen = ({ route }) => {
|
||||
const intl = useIntl();
|
||||
|
||||
const [content, setContent] = useState(route.params?.content ?? null);
|
||||
const [content] = useState(route.params?.content ?? null);
|
||||
const [activeVotes, setActiveVotes] = useState(get(content, 'active_votes') || []);
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
|
||||
const headerTitle = intl.formatMessage({
|
||||
id: 'voters.voters_info',
|
||||
@ -54,6 +53,7 @@ const VotersScreen = ({ route, navigation }) => {
|
||||
{({ data, filterResult, filterIndex, handleOnVotersDropdownSelect, handleSearch }) => (
|
||||
<>
|
||||
<BasicHeader
|
||||
backIconName="close"
|
||||
title={`${headerTitle} (${data && data.length})`}
|
||||
isHasSearch
|
||||
handleOnSearch={(text) => handleSearch(text, 'voter')}
|
||||
|
Loading…
Reference in New Issue
Block a user