Skip to content

Commit

Permalink
Merge pull request #247 from internxt/bugfix/fix-numeric-pad
Browse files Browse the repository at this point in the history
[_] bugfix/Fix android numerical pad issue
  • Loading branch information
CandelR authored Dec 24, 2024
2 parents b1fe992 + f81751d commit 91f872b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ android {
applicationId 'com.internxt.cloud'
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 99
versionName "1.6.0"
versionCode 100
versionName "1.6.1"

buildConfigField("boolean", "REACT_NATIVE_UNSTABLE_USE_RUNTIME_SCHEDULER_ALWAYS", (findProperty("reactNative.unstable_useRuntimeSchedulerAlways") ?: true).toString())
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "drive-mobile",
"version": "v1.6.0",
"version": "v1.6.1",
"private": true,
"license": "GNU",
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion src/components/AppTextInput/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export interface AppTextInputProps extends TextInputProps {
label?: string;
renderAppend?: ({ isFocused }: { isFocused: boolean }) => JSX.Element | undefined;
inputRef?: React.LegacyRef<TextInput>;
disableCustomAndroidCursor?: boolean;
}

const AppTextInput = (props: AppTextInputProps): JSX.Element => {
Expand Down Expand Up @@ -110,7 +111,7 @@ const AppTextInput = (props: AppTextInputProps): JSX.Element => {
const inputProps = {
...props,
ref: props.inputRef || localInputRef,
onChangeText: isAndroid ? handleChangeText : props.onChangeText,
onChangeText: isAndroid && !props.disableCustomAndroidCursor ? handleChangeText : props.onChangeText,
onSelectionChange: isAndroid ? handleSelectionChange : props.onSelectionChange,
selection: isAndroid ? selection : props.selection,
};
Expand Down
1 change: 1 addition & 0 deletions src/components/CodeInput/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ const CodeInput = (props: CodeInputProps) => {
onChangeText={onDigitChangeText}
onKeyPress={onDigitKeyPressed}
keyboardType="numeric"
disableCustomAndroidCursor
/>
);
});
Expand Down
3 changes: 2 additions & 1 deletion src/screens/SignInScreen/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Eye, EyeSlash, WarningCircle } from 'phosphor-react-native';
import React, { useEffect, useRef, useState } from 'react';
import { useEffect, useRef, useState } from 'react';
import { Animated, TextInput, View } from 'react-native';

import { useKeyboard } from '@internxt-mobile/hooks/useKeyboard';
Expand Down Expand Up @@ -212,6 +212,7 @@ function SignInScreen({ navigation }: RootStackScreenProps<'SignIn'>): JSX.Eleme
keyboardType="decimal-pad"
status={failed2FA ? ['error', renderErrorMessage()] : undefined}
onChangeText={setTwoFactorCode}
disableCustomAndroidCursor
/>
</Animated.View>

Expand Down

0 comments on commit 91f872b

Please sign in to comment.