This commit is contained in:
Nouman Tahir 2022-10-17 13:10:35 +05:00
parent 269d3fb93a
commit ef9756cb2f
11 changed files with 21 additions and 55 deletions

View File

@ -25,16 +25,8 @@ class ContainerHeaderView extends PureComponent {
// Component Functions
render() {
const {
color,
defaultTitle,
fontSize,
hasSeperator,
iconName,
isBoldTitle,
title,
isCenter,
} = this.props;
const { color, defaultTitle, fontSize, hasSeperator, iconName, isBoldTitle, title, isCenter } =
this.props;
return (
<View style={[styles.wrapper, hasSeperator && styles.hasTopBorder]}>

View File

@ -80,7 +80,6 @@ const ForegroundNotification = ({ remoteMessage }: Props) => {
hideTimeoutRef.current = setTimeout(() => {
hide();
}, duration);
};
const hide = async () => {
@ -88,7 +87,7 @@ const ForegroundNotification = ({ remoteMessage }: Props) => {
await containerRef.current.fadeOutUp(300);
setIsVisible(false);
if (hideTimeoutRef.current){
if (hideTimeoutRef.current) {
clearTimeout(hideTimeoutRef.current);
}
}
@ -114,7 +113,6 @@ const ForegroundNotification = ({ remoteMessage }: Props) => {
hide();
};
return (
isVisible && (
<AnimatedView

View File

@ -37,16 +37,8 @@ class MainButton extends Component {
};
_getBody = () => {
const {
isLoading,
text,
secondText,
iconColor,
iconName,
source,
iconType,
textStyle,
} = this.props;
const { isLoading, text, secondText, iconColor, iconName, source, iconType, textStyle } =
this.props;
if (isLoading) {
this._getIndicator();

View File

@ -60,7 +60,7 @@ export const UsernameAutofillBar = ({ text, selection, onApplyUsername }: Props)
200,
{ leading: true },
),
[]
[],
);
const _onUserSelect = (username) => {

View File

@ -3,7 +3,7 @@ import RenderHTML, { CustomRendererProps, Element, TNode } from 'react-native-re
import { useHtmlIframeProps, iframeModel } from '@native-html/iframe-plugin';
import WebView from 'react-native-webview';
import { ScrollView } from 'react-native-gesture-handler';
// import { prependChild, removeElement } from 'htmlparser2/node_modules/domutils';
// import { prependChild, removeElement } from 'htmlparser2/node_modules/domutils';
import styles from './postHtmlRendererStyles';
import { LinkData, parseLinkData } from './linkDataParser';
import VideoThumb from './videoThumb';

View File

@ -35,7 +35,6 @@ const postsListContainer = (
}: postsListContainerProps,
ref,
) => {
const flatListRef = useRef(null);
const [imageHeights, setImageHeights] = useState(new Map<string, number>());
@ -64,7 +63,6 @@ const postsListContainer = (
animated: false,
});
}
}, [posts]);
useEffect(() => {
@ -73,7 +71,6 @@ const postsListContainer = (
offset: posts && posts.length == 0 ? 0 : scrollPosition,
animated: false,
});
}, [scrollPosition]);
const _setImageHeightInMap = (mapKey: string, height: number) => {
@ -116,7 +113,6 @@ const postsListContainer = (
posts &&
posts.filter((x) => x.permlink === p.permlink).length <= 0
) {
//get image height from cache if available
const localId = p.author + p.permlink;
const imgHeight = imageHeights.get(localId);
@ -136,7 +132,6 @@ const postsListContainer = (
}
}
let isMuted = mutes && mutes.indexOf(item.author) > -1;
if (!isMuted && get(item, 'author', null)) {
//get image height from cache if available
@ -157,7 +152,7 @@ const postsListContainer = (
);
}
return e;
};
}
return (
<ThemeContainer>
@ -199,7 +194,6 @@ const postsListContainer = (
</ThemeContainer>
);
};
}
};
export default forwardRef(postsListContainer);
export default forwardRef(postsListContainer);

View File

@ -56,13 +56,8 @@ class TabBar extends PureComponent {
};
_renderUnderline = () => {
const {
tabs,
tabUnderlineDefaultWidth,
tabUnderlineScaleX,
scrollValue,
underlineStyle,
} = this.props;
const { tabs, tabUnderlineDefaultWidth, tabUnderlineScaleX, scrollValue, underlineStyle } =
this.props;
const { activeColor } = this.state;
const containerWidth = getWindowDimensions().nativeWidth;

View File

@ -76,8 +76,8 @@ export const StackNavigator = ({ initRoute }) => {
return (
<RootStack.Navigator
initialRouteName={initRoute}
screenOptions={{ headerShown: false, animation: 'slide_from_bottom' }}>
screenOptions={{ headerShown: false, animation: 'slide_from_bottom' }}
>
<RootStack.Screen name={ROUTES.STACK.MAIN} component={MainStackNavigator} />
<RootStack.Screen name={ROUTES.SCREENS.REGISTER} component={Register} />
@ -91,5 +91,3 @@ export const StackNavigator = ({ initRoute }) => {
</RootStack.Navigator>
);
};

View File

@ -50,7 +50,8 @@ const RegisterScreen = ({ navigation, route }) => {
}, []);
const _handleEmailChange = (value) => {
const re = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
const re =
/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
setIsEmailValid(re.test(value));
setEmail(value);
};

View File

@ -39,9 +39,8 @@ const CommunitiesResultsContainer = ({ children, searchValue }) => {
// handle cache when searchResultsScreen data updates in communities reducer
useEffect(() => {
if (subscribingCommunitiesInSearchResultsScreen && selectedCommunityItem) {
const { status } = subscribingCommunitiesInSearchResultsScreen[
selectedCommunityItem.communityId
];
const { status } =
subscribingCommunitiesInSearchResultsScreen[selectedCommunityItem.communityId];
if (status === statusMessage.SUCCESS) {
dispatch(updateSubscribedCommunitiesCache(selectedCommunityItem));
}

View File

@ -125,12 +125,9 @@ export default (url) => {
}
if (
[
'https://ecency.com',
'https://hive.blog',
'https://peakd.com',
'https://leofinance.io',
].some((x) => url.startsWith(x))
['https://ecency.com', 'https://hive.blog', 'https://peakd.com', 'https://leofinance.io'].some(
(x) => url.startsWith(x),
)
) {
return parseAuthorPermlink(url);
}