Skip to content

Commit 06e5de6

Browse files
committed
fix: removing dev settings
1 parent 81cfadd commit 06e5de6

File tree

2 files changed

+28
-24
lines changed

2 files changed

+28
-24
lines changed

android/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ android {
8080
applicationId "to.bitkit"
8181
minSdkVersion rootProject.ext.minSdkVersion
8282
targetSdkVersion rootProject.ext.targetSdkVersion
83-
versionCode 124
83+
versionCode 125
8484
versionName "1.0"
8585
multiDexEnabled true
8686
missingDimensionStrategy 'react-native-camera', 'general'

src/screens/Settings/index.tsx

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
1-
import React, { memo, ReactElement, useMemo, useState } from 'react';
1+
import React, { memo, ReactElement, useMemo } from 'react';
22
import { Image, StyleSheet, TouchableOpacity } from 'react-native';
33
import { useTranslation } from 'react-i18next';
44

55
import { View as ThemedView } from '../../styles/components';
66
import { EItemType, IListData, ItemData } from '../../components/List';
77
import SafeAreaInset from '../../components/SafeAreaInset';
88
import SettingsView from './SettingsView';
9-
import { useAppDispatch, useAppSelector } from '../../hooks/redux';
10-
import { updateSettings } from '../../store/slices/settings';
11-
import { showToast } from '../../utils/notifications';
9+
import {
10+
// useAppDispatch,
11+
useAppSelector,
12+
} from '../../hooks/redux';
13+
// import { updateSettings } from '../../store/slices/settings';
14+
// import { showToast } from '../../utils/notifications';
1215
import { SettingsScreenProps } from '../../navigation/types';
1316
import { enableDevOptionsSelector } from '../../store/reselect/settings';
1417
import {
@@ -27,26 +30,26 @@ const MainSettings = ({
2730
navigation,
2831
}: SettingsScreenProps<'MainSettings'>): ReactElement => {
2932
const { t } = useTranslation('settings');
30-
const dispatch = useAppDispatch();
33+
// const dispatch = useAppDispatch();
3134
const enableDevOptions = useAppSelector(enableDevOptionsSelector);
32-
const [enableDevOptionsCount, setEnableDevOptionsCount] = useState(0);
35+
// const [enableDevOptionsCount, setEnableDevOptionsCount] = useState(0);
3336

34-
const updateDevOptions = (): void => {
35-
const count = enableDevOptionsCount + 1;
36-
setEnableDevOptionsCount(count);
37-
if (count >= 5) {
38-
const enabled = !enableDevOptions;
39-
dispatch(updateSettings({ enableDevOptions: enabled }));
40-
showToast({
41-
type: 'success',
42-
title: t(enabled ? 'dev_enabled_title' : 'dev_disabled_title'),
43-
description: t(
44-
enabled ? 'dev_enabled_message' : 'dev_disabled_message',
45-
),
46-
});
47-
setEnableDevOptionsCount(0);
48-
}
49-
};
37+
// const updateDevOptions = (): void => {
38+
// const count = enableDevOptionsCount + 1;
39+
// setEnableDevOptionsCount(count);
40+
// if (count >= 5) {
41+
// const enabled = !enableDevOptions;
42+
// dispatch(updateSettings({ enableDevOptions: enabled }));
43+
// showToast({
44+
// type: 'success',
45+
// title: t(enabled ? 'dev_enabled_title' : 'dev_disabled_title'),
46+
// description: t(
47+
// enabled ? 'dev_enabled_message' : 'dev_disabled_message',
48+
// ),
49+
// });
50+
// setEnableDevOptionsCount(0);
51+
// }
52+
// };
5053

5154
const listData: IListData[] = useMemo(() => {
5255
const data: ItemData[] = [
@@ -116,7 +119,8 @@ const MainSettings = ({
116119
style={styles.imageContainer}
117120
activeOpacity={1}
118121
testID="DevOptions"
119-
onPress={updateDevOptions}>
122+
// onPress={updateDevOptions}
123+
>
120124
<Image style={styles.image} source={imageSrc} />
121125
</TouchableOpacity>
122126
<SafeAreaInset type="bottom" minPadding={16} />

0 commit comments

Comments
 (0)