Merge pull request #1846 from ecency/development

3.0.13 final
This commit is contained in:
Feruz M 2021-01-31 20:57:13 +02:00 committed by GitHub
commit 91afae82cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 47 additions and 28 deletions

View File

@ -31,7 +31,9 @@ const AccountsBottomSheetContainer = ({ navigation }) => {
const _navigateToRoute = (routeName = null) => {
if (routeName) {
accountsBottomSheetViewRef.current?.closeAccountsBottomSheet();
navigate({ routeName });
setTimeout(() => {
navigate({ routeName });
}, 500);
}
};

View File

@ -124,10 +124,8 @@ export default EStyleSheet.create({
},
textButton: {
color: '$primaryBlue',
},
buttonContainer: {
height: 50,
justifyContent: 'center',
fontSize: 16,
paddingVertical: 16,
paddingHorizontal: 16,
},
separator: {
@ -141,4 +139,9 @@ export default EStyleSheet.create({
checkIcon: {
color: '$successColor',
},
button: {
justifyContent: 'center',
backgroundColor: 'transparent',
height: 50,
},
});

View File

@ -1,9 +1,11 @@
import React, { useCallback, useMemo, useRef, forwardRef, useImperativeHandle } from 'react';
import { View, Text, TouchableOpacity } from 'react-native';
import { View, Text } from 'react-native';
import { useDispatch } from 'react-redux';
import { useIntl } from 'react-intl';
import {
BottomSheetModal,
TouchableOpacity,
TouchableWithoutFeedback,
BottomSheetModalProvider,
BottomSheetFlatList,
} from '@gorhom/bottom-sheet';
@ -53,7 +55,7 @@ const AccountsBottomSheet = forwardRef(
<Text style={styles.name}>{`@${item.username}`}</Text>
</View>
</View>
{currentAccount.name === item.name && (
{currentAccount.name === item.username && (
<Icon iconType="AntDesign" name="checkcircle" style={styles.checkIcon} size={24} />
)}
</TouchableOpacity>
@ -86,27 +88,33 @@ const AccountsBottomSheet = forwardRef(
<BottomSheetFlatList
data={accounts}
scrollEnabled
keyExtractor={(item) => item.name}
keyExtractor={(item, index) => `${item.name}${item.username}${index}`}
renderItem={({ item }) => _renderAccountTile(item)}
//contentContainerStyle={styles.contentContainer}
/>
<Separator style={styles.separator} />
<View style={{ paddingBottom: insets.bottom }}>
<View style={styles.buttonContainer}>
<TextButton
text={intl.formatMessage({ id: 'side_menu.create_a_new_account' })}
textStyle={styles.textButton}
onPress={() => navigateToRoute(ROUTES.SCREENS.REGISTER)}
/>
</View>
<TouchableWithoutFeedback
style={styles.button}
onPress={() => navigateToRoute(ROUTES.SCREENS.REGISTER)}
>
<View>
<Text style={styles.textButton}>
{intl.formatMessage({ id: 'side_menu.create_a_new_account' })}
</Text>
</View>
</TouchableWithoutFeedback>
<Separator style={styles.separator} />
<View style={styles.buttonContainer}>
<TextButton
text={intl.formatMessage({ id: 'side_menu.add_an_existing_account' })}
textStyle={styles.textButton}
onPress={() => navigateToRoute(ROUTES.SCREENS.LOGIN)}
/>
</View>
<TouchableWithoutFeedback
style={styles.button}
onPress={() => navigateToRoute(ROUTES.SCREENS.LOGIN)}
>
<View>
<Text style={styles.textButton}>
{intl.formatMessage({ id: 'side_menu.add_an_existing_account' })}
</Text>
</View>
</TouchableWithoutFeedback>
<Separator style={styles.separator} />
</View>
</View>

View File

@ -1,5 +1,5 @@
import React, { Fragment } from 'react';
import { TouchableWithoutFeedback, Text, View } from 'react-native';
import { Text, View, TouchableWithoutFeedback } from 'react-native';
import styles from './textButtonStyles';

View File

@ -1,4 +1,4 @@
import React, { Component, useState, useEffect } from 'react';
import React, { useState, useEffect } from 'react';
import get from 'lodash/get';
import { TouchableOpacity, Text, View, Dimensions } from 'react-native';
import { injectIntl } from 'react-intl';
@ -150,7 +150,7 @@ const PostCardView = ({
iconStyle={styles.commentIcon}
iconType="MaterialCommunityIcons"
isClickable
text={activeVot.length}
text={get(activeVot, 'length', 0)}
onPress={_handleOnVotersPress}
/>
</TouchableOpacity>
@ -161,7 +161,7 @@ const PostCardView = ({
iconStyle={styles.commentIcon}
iconType="MaterialIcons"
isClickable
text={reblogs.length}
text={get(reblogs, 'length', 0)}
onPress={_handleOnReblogsPress}
/>
<TextWithIcon

View File

@ -47,12 +47,14 @@ class ProgressiveImage extends React.Component {
style={[style, { opacity: this.thumbnailAnimated }]}
onLoad={this.handleThumbnailLoad}
blurRadius={1}
resizeMode={FastImage.resizeMode.cover}
/>
<AnimatedFastImage
{...props}
source={source}
style={[styles.imageOverlay, { opacity: this.imageAnimated }, style]}
onLoad={this.onImageLoad}
resizeMode={FastImage.resizeMode.cover}
/>
</View>
);

View File

@ -28,6 +28,7 @@ export default {
'vi-VN': require('./vi-VN.json'),
'zh-CN': require('./zh-CN.json'),
'zh-TW': require('./zh-TW.json'),
'et-EE': require('./et-EE.json'),
};
export const locales = [
@ -50,6 +51,7 @@ export const locales = [
{ id: 'fi-FI', name: 'Finnish' },
{ id: 'fil-PH', name: 'Filipino' },
{ id: 'pt-PT', name: 'Porteguese' },
{ id: 'et-EE', name: 'Estonian' },
{ id: 'pl-PL', name: 'Polish' },
{ id: 'sr-CS', name: 'Serbian' },
{ id: 'fa-IR', name: 'Persian' },

View File

@ -12,6 +12,7 @@ export default [
'Bahasa Melayu',
'Deutsch',
'Español',
'Eesti keel',
'Français',
'Italiano',
'Srpski',
@ -44,6 +45,7 @@ export const VALUE = [
'ms-MY',
'de-DE',
'es-ES',
'et-EE',
'fr-FR',
'it-IT',
'sr-CS',

View File

@ -33,9 +33,9 @@ const PeopleResultsContainer = (props) => {
const _handleOnPress = (item) => {
navigation.navigate({
routeName: item === username ? ROUTES.TABBAR.PROFILE : ROUTES.SCREENS.PROFILE,
routeName: item.name === username ? ROUTES.TABBAR.PROFILE : ROUTES.SCREENS.PROFILE,
params: {
username: item,
username: item.name,
},
key: item.text,
});