Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.0.0 release #1984

Closed
wants to merge 19 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ android {
applicationId "to.bitkit"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 111
versionCode 125
versionName "1.0"
multiDexEnabled true
missingDimensionStrategy 'react-native-camera', 'general'
Expand Down
4 changes: 2 additions & 2 deletions ios/bitkit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIconOrange;
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 111;
CURRENT_PROJECT_VERSION = 125;
DEVELOPMENT_TEAM = KYH47R284B;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = bitkit/Info.plist;
Expand Down Expand Up @@ -549,7 +549,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIconOrange;
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 111;
CURRENT_PROJECT_VERSION = 125;
DEVELOPMENT_TEAM = KYH47R284B;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = bitkit/Info.plist;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "bitkit",
"author": "Synonym",
"version": "1.0.0-beta.111",
"version": "1.0.0-125",
"scripts": {
"start": "react-native start",
"android": "react-native run-android",
Expand Down
50 changes: 27 additions & 23 deletions src/screens/Settings/index.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
import React, { memo, ReactElement, useMemo, useState } from 'react';
import React, { memo, ReactElement, useMemo } from 'react';
import { Image, StyleSheet, TouchableOpacity } from 'react-native';
import { useTranslation } from 'react-i18next';

import { View as ThemedView } from '../../styles/components';
import { EItemType, IListData, ItemData } from '../../components/List';
import SafeAreaInset from '../../components/SafeAreaInset';
import SettingsView from './SettingsView';
import { useAppDispatch, useAppSelector } from '../../hooks/redux';
import { updateSettings } from '../../store/slices/settings';
import { showToast } from '../../utils/notifications';
import {
// useAppDispatch,
useAppSelector,
} from '../../hooks/redux';
// import { updateSettings } from '../../store/slices/settings';
// import { showToast } from '../../utils/notifications';
import { SettingsScreenProps } from '../../navigation/types';
import { enableDevOptionsSelector } from '../../store/reselect/settings';
import {
Expand All @@ -27,26 +30,26 @@ const MainSettings = ({
navigation,
}: SettingsScreenProps<'MainSettings'>): ReactElement => {
const { t } = useTranslation('settings');
const dispatch = useAppDispatch();
// const dispatch = useAppDispatch();
const enableDevOptions = useAppSelector(enableDevOptionsSelector);
const [enableDevOptionsCount, setEnableDevOptionsCount] = useState(0);
// const [enableDevOptionsCount, setEnableDevOptionsCount] = useState(0);

const updateDevOptions = (): void => {
const count = enableDevOptionsCount + 1;
setEnableDevOptionsCount(count);
if (count >= 5) {
const enabled = !enableDevOptions;
dispatch(updateSettings({ enableDevOptions: enabled }));
showToast({
type: 'success',
title: t(enabled ? 'dev_enabled_title' : 'dev_disabled_title'),
description: t(
enabled ? 'dev_enabled_message' : 'dev_disabled_message',
),
});
setEnableDevOptionsCount(0);
}
};
// const updateDevOptions = (): void => {
// const count = enableDevOptionsCount + 1;
// setEnableDevOptionsCount(count);
// if (count >= 5) {
// const enabled = !enableDevOptions;
// dispatch(updateSettings({ enableDevOptions: enabled }));
// showToast({
// type: 'success',
// title: t(enabled ? 'dev_enabled_title' : 'dev_disabled_title'),
// description: t(
// enabled ? 'dev_enabled_message' : 'dev_disabled_message',
// ),
// });
// setEnableDevOptionsCount(0);
// }
// };

const listData: IListData[] = useMemo(() => {
const data: ItemData[] = [
Expand Down Expand Up @@ -116,7 +119,8 @@ const MainSettings = ({
style={styles.imageContainer}
activeOpacity={1}
testID="DevOptions"
onPress={updateDevOptions}>
// onPress={updateDevOptions}
>
<Image style={styles.image} source={imageSrc} />
</TouchableOpacity>
<SafeAreaInset type="bottom" minPadding={16} />
Expand Down
Loading