Skip to content

Commit

Permalink
Merge pull request #7 from n1kko777/1.0.16
Browse files Browse the repository at this point in the history
– Обновились до новой версии Kitten UI 5.0
– Улучшена производительность
– Исправлены баги
  • Loading branch information
n1kko777 authored Apr 4, 2021
2 parents 5f34f32 + 6dffce2 commit 2e35963
Show file tree
Hide file tree
Showing 47 changed files with 19,483 additions and 11,385 deletions.
1 change: 1 addition & 0 deletions App.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import store from "./src/store";

import { AppContainer } from "./src/components/AppContainer";
import useDisableBack from "./src/hook/useDisableBack";

const App = () => {
useDisableBack();
return (
Expand Down
6 changes: 3 additions & 3 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"ios",
"android"
],
"version": "1.0.15",
"version": "1.0.16",
"orientation": "portrait",
"icon": "./assets/logo.png",
"splash": {
Expand All @@ -25,11 +25,11 @@
"ios": {
"supportsTablet": true,
"bundleIdentifier": "ru.mncntrl.n1kko777",
"buildNumber": "1.0.15"
"buildNumber": "1.0.16"
},
"android": {
"package": "ru.mncntrl.n1kko777",
"versionCode": 15,
"versionCode": 16,
"permissions": [
"CAMERA",
"READ_EXTERNAL_STORAGE",
Expand Down
28,534 changes: 18,114 additions & 10,420 deletions package-lock.json

Large diffs are not rendered by default.

81 changes: 41 additions & 40 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,55 +26,56 @@
]
},
"dependencies": {
"@eva-design/eva": "^1.4.0",
"@expo/vector-icons": "^10.0.0",
"@react-native-async-storage/async-storage": "^1.13.2",
"@eva-design/eva": "^2.0.0",
"@expo/vector-icons": "^12.0.0",
"@react-native-async-storage/async-storage": "^1.14.1",
"@react-native-community/masked-view": "0.1.10",
"@react-navigation/bottom-tabs": "5.1.1",
"@react-navigation/native": "^5.0.9",
"@react-navigation/stack": "^5.1.1",
"@ui-kitten/components": "^4.4.1",
"@ui-kitten/eva-icons": "^4.3.2",
"@ui-kitten/moment": "^4.4.1",
"@react-navigation/bottom-tabs": "5.11.8",
"@react-navigation/native": "^5.9.3",
"@react-navigation/stack": "^5.14.3",
"@ui-kitten/components": "^5.0.0",
"@ui-kitten/eva-icons": "^5.0.0",
"@ui-kitten/moment": "^5.0.0",
"axios": "^0.21.1",
"expo": "^38.0.0",
"expo-clipboard": "^1.0.1",
"expo-font": "^9.0.0",
"expo-haptics": "~8.2.1",
"expo-image-picker": "~8.3.0",
"expo-permissions": "~9.0.1",
"moment": "^2.24.0",
"react": "16.11.0",
"react-dom": "16.11.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-38.0.2.tar.gz",
"expo": "^40.0.1",
"expo-clipboard": "~1.0.1",
"expo-font": "~8.4.0",
"expo-haptics": "~8.4.0",
"expo-image-picker": "~9.2.0",
"expo-permissions": "~10.0.0",
"install": "^0.13.0",
"moment": "^2.29.1",
"npm": "^7.6.3",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz",
"react-native-appearance": "~0.3.3",
"react-native-chart-kit": "^5.4.0",
"react-native-elements": "^1.2.7",
"react-native-gesture-handler": "~1.6.0",
"react-native-paper": "^3.5.1",
"react-native-reanimated": "~1.9.0",
"react-native-redash": "^14.2.4",
"react-native-safe-area-context": "~3.0.7",
"react-native-screens": "~2.9.0",
"react-native-chart-kit": "^6.11.0",
"react-native-elements": "^3.3.2",
"react-native-gesture-handler": "~1.8.0",
"react-native-keyboard-aware-scroll-view": "^0.9.3",
"react-native-paper": "^4.7.2",
"react-native-safe-area-context": "3.1.9",
"react-native-screens": "~2.15.2",
"react-native-svg": "12.1.0",
"react-native-web": "~0.11.7",
"react-navigation": "^4.1.0",
"react-navigation-drawer": "^2.3.3",
"react-navigation-header-buttons": "^3.0.4",
"react-navigation-material-bottom-tabs": "^2.1.5",
"react-navigation-stack": "^2.0.16",
"react-navigation-tabs": "^2.7.0",
"react-redux": "^7.1.3",
"react-native-web": "~0.13.12",
"react-navigation": "^4.4.4",
"react-navigation-drawer": "^2.7.0",
"react-navigation-header-buttons": "^7.0.0",
"react-navigation-material-bottom-tabs": "^2.3.4",
"react-navigation-stack": "^2.10.4",
"react-navigation-tabs": "^2.11.0",
"react-redux": "^7.2.2",
"redux": "^4.0.5",
"redux-devtools-extension": "^2.13.8",
"redux-devtools-extension": "^2.13.9",
"redux-thunk": "^2.3.0",
"reselect": "^3.0.1"
"reselect": "^4.0.0"
},
"devDependencies": {
"@babel/core": "^7.0.0",
"@babel/core": "~7.9.0",
"babel-eslint": "^10.1.0",
"babel-preset-expo": "^8.2.3",
"eslint": "^7.21.0",
"babel-preset-expo": "8.3.0",
"eslint": "^7.22.0",
"eslint-config-airbnb": "^18.2.1",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-import": "^2.22.1",
Expand Down
17 changes: 10 additions & 7 deletions src/components/FlexibleView.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { memo, useCallback, useState } from "react";
import { ScrollView, Dimensions } from "react-native";
import { KeyboardAwareScrollView } from "react-native-keyboard-aware-scroll-view";

const { height } = Dimensions.get("window");

Expand All @@ -14,12 +15,14 @@ export const FlexibleView = memo(({ children }) => {
const scrollEnabled = screenHeight > height;

return (
<ScrollView
style={{ flex: 1 }}
scrollEnabled={scrollEnabled}
onContentSizeChange={onContentSizeChange}
>
{children}
</ScrollView>
<KeyboardAwareScrollView>
<ScrollView
bounces={false}
scrollEnabled={scrollEnabled}
onContentSizeChange={onContentSizeChange}
>
{children}
</ScrollView>
</KeyboardAwareScrollView>
);
});
7 changes: 5 additions & 2 deletions src/components/ScreenTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
StatusBar,
TouchableWithoutFeedback,
Keyboard,
Platform,
} from "react-native";
import { ThemeContext } from "../themes/theme-context";

Expand All @@ -15,7 +14,6 @@ export const ScreenTemplate = memo(({ children }) => {
const onTouchablePress = useCallback(() => Keyboard.dismiss(), []);
const safeAreaStyle = {
flex: 1,
paddingTop: Platform.OS === "android" ? StatusBar.currentHeight : 0,
backgroundColor:
themeContext.theme === "light"
? THEME.BACKGROUND_LIGHT
Expand All @@ -25,6 +23,11 @@ export const ScreenTemplate = memo(({ children }) => {
return (
<>
<StatusBar
backgroundColor={
themeContext.theme === "light"
? THEME.BACKGROUND_LIGHT
: THEME.BACKGROUND_DARK
}
barStyle={`${
themeContext.theme === "light" ? "dark" : "light"
}-content`}
Expand Down
40 changes: 24 additions & 16 deletions src/components/account/AccountListItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,21 @@ export const AccountListItem = memo(({ item, navigation }) => {

const renderIconItem = useCallback((style) => <CardIcon {...style} />, []);
const renderItemAccessory = useCallback(
({ balance, style }) => (
() => (
<Text
style={{
fontSize: 16,
color:
kittenTheme[
style !== undefined
? style
: `color-primary-${themeContext.theme === "light" ? 800 : 100}`
item.style ||
`color-primary-${themeContext.theme === "light" ? 800 : 100}`
],
}}
>
{balance !== "" && `${splitToDigits(balance.toString())}`}
{splitToDigits(item.balance)}
</Text>
),
[kittenTheme, themeContext.theme]
[item.balance, item.style, kittenTheme, themeContext.theme]
);

const deleteHandler = useCallback(() => {
Expand All @@ -68,7 +67,13 @@ export const AccountListItem = memo(({ item, navigation }) => {
}, [close, dispatch, item]);

const RightAction = useCallback(
() => <Button onPress={deleteHandler} icon={DeleteIcon} status="danger" />,
() => (
<Button
onPress={deleteHandler}
accessoryLeft={DeleteIcon}
status="danger"
/>
),
[deleteHandler]
);

Expand All @@ -78,6 +83,15 @@ export const AccountListItem = memo(({ item, navigation }) => {
});
}, [item, navigation]);

const renderListTitle = useCallback(
(evaProps) => (
<Text {...evaProps} style={[evaProps.style, { fontSize: 16 }]}>
{item.account_name}
</Text>
),
[item.account_name]
);

return (
<Swipeable
ref={swipeableRow}
Expand All @@ -86,15 +100,9 @@ export const AccountListItem = memo(({ item, navigation }) => {
>
<ListItem
onPress={updateHandler}
title={`${item.account_name}`}
titleStyle={{
fontSize: 16,
}}
descriptionStyle={{
fontSize: 14,
}}
icon={renderIconItem}
accessory={() => renderItemAccessory(item)}
title={renderListTitle}
accessoryLeft={renderIconItem}
accessoryRight={renderItemAccessory}
style={{
paddingVertical: 15,
}}
Expand Down
29 changes: 19 additions & 10 deletions src/components/category/CategoryListItem.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { memo, useCallback } from "react";
import Swipeable from "react-native-gesture-handler/Swipeable";

import { ListItem, Button } from "@ui-kitten/components";
import { ListItem, Button, Text } from "@ui-kitten/components";

import { Alert } from "react-native";
import { useDispatch } from "react-redux";
Expand Down Expand Up @@ -44,7 +44,13 @@ export const CategoryListItem = memo(({ item, navigation }) => {
}, [close, dispatch, item]);

const RightAction = useCallback(
() => <Button onPress={deleteHandler} icon={DeleteIcon} status="danger" />,
() => (
<Button
onPress={deleteHandler}
accessoryLeft={DeleteIcon}
status="danger"
/>
),
[deleteHandler]
);

Expand All @@ -54,6 +60,15 @@ export const CategoryListItem = memo(({ item, navigation }) => {
});
}, [item, navigation]);

const renderListTitle = useCallback(
(evaProps) => (
<Text {...evaProps} style={[evaProps.style, { fontSize: 16 }]}>
{item.category_name}
</Text>
),
[item.category_name]
);

return (
<Swipeable
ref={swipeableRow}
Expand All @@ -62,14 +77,8 @@ export const CategoryListItem = memo(({ item, navigation }) => {
>
<ListItem
onPress={updateHandler}
title={`${item.category_name}`}
titleStyle={{
fontSize: 16,
}}
descriptionStyle={{
fontSize: 14,
}}
icon={renderIconItem}
title={renderListTitle}
accessoryLeft={renderIconItem}
style={{
paddingVertical: 15,
}}
Expand Down
Loading

0 comments on commit 2e35963

Please sign in to comment.