Skip to content

Commit 2baaf3d

Browse files
committed
Replace UndoTextInput with TextInput
The undo bug has been fixed in New Arch.
1 parent 71d3d23 commit 2baaf3d

File tree

4 files changed

+7
-38
lines changed

4 files changed

+7
-38
lines changed

Diff for: __tests__/usecase/settings/UploadSettings.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ import UploadSettings from '../../../src/usecase/settings/UploadSettings';
33
import { configureStore } from '@reduxjs/toolkit';
44
import { reducer } from '../../../src/store';
55

6-
jest.mock('../../../src/usecase/shared/UndoTextInput', () => 'TextInput');
7-
86
describe('UploadSettings', () => {
97
it('stores the configured settings', async () => {
108
const store = configureStore({ reducer });

Diff for: src/usecase/login/LoginForm.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import { ConnectionError } from '../../lib/weechat/connection';
1515
import type { StoreState } from '../../store';
1616
import { setConnectionInfoAction } from '../../store/actions';
1717
import { styles } from '../settings/styles';
18-
import UndoTextInput from '../shared/UndoTextInput';
1918

2019
const connector = connect((state: StoreState) => ({
2120
hostname: state.connection.hostname || '',
@@ -97,7 +96,7 @@ class LoginForm extends React.Component<Props, State> {
9796
<Text style={styles.header}>
9897
Connect to Weechat relay via websocket
9998
</Text>
100-
<UndoTextInput
99+
<TextInput
101100
style={styles.input}
102101
placeholderTextColor="#4157af"
103102
keyboardType="url"

Diff for: src/usecase/settings/UploadSettings.tsx

+6-7
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import { SafeAreaView } from 'react-native-safe-area-context';
1212
import { setMediaUploadOptionsAction } from '../../store/actions';
1313
import { useAppDispatch, useAppSelector } from '../../store/hooks';
1414
import { KeyboardAvoidingView } from '../shared/KeyboardAvoidingView';
15-
import UndoTextInput from '../shared/UndoTextInput';
1615
import { styles } from './styles';
1716

1817
type Props = {
@@ -115,7 +114,7 @@ const UploadSettings: React.FC<Props> = ({ setShowUploadSettings }) => {
115114
from the camera roll. Press the button twice to upload media from
116115
elsewhere on your device. Press and hold the button to take a photo.
117116
</Text>
118-
<UndoTextInput
117+
<TextInput
119118
style={styles.input}
120119
placeholderTextColor="#4157af"
121120
keyboardType="url"
@@ -138,7 +137,7 @@ const UploadSettings: React.FC<Props> = ({ setShowUploadSettings }) => {
138137
</View>
139138
{uploadOptionsState.basicAuth && (
140139
<>
141-
<UndoTextInput
140+
<TextInput
142141
style={styles.input}
143142
placeholderTextColor="#4157af"
144143
keyboardType="email-address"
@@ -159,7 +158,7 @@ const UploadSettings: React.FC<Props> = ({ setShowUploadSettings }) => {
159158
/>
160159
</>
161160
)}
162-
<UndoTextInput
161+
<TextInput
163162
style={styles.input}
164163
placeholderTextColor="#4157af"
165164
autoCapitalize="none"
@@ -168,7 +167,7 @@ const UploadSettings: React.FC<Props> = ({ setShowUploadSettings }) => {
168167
onChangeText={setUploadOptionsFieldName}
169168
value={uploadOptionsState.fieldName}
170169
/>
171-
<UndoTextInput
170+
<TextInput
172171
style={styles.input}
173172
placeholderTextColor="#4157af"
174173
autoCapitalize="none"
@@ -189,7 +188,7 @@ const UploadSettings: React.FC<Props> = ({ setShowUploadSettings }) => {
189188
columnGap: 10
190189
}}
191190
>
192-
<UndoTextInput
191+
<TextInput
193192
style={[styles.input, { minWidth: 300, flexGrow: 1 }]}
194193
placeholderTextColor="#4157af"
195194
autoCapitalize="none"
@@ -200,7 +199,7 @@ const UploadSettings: React.FC<Props> = ({ setShowUploadSettings }) => {
200199
setUploadOptionsHeaderName(index, text)
201200
}
202201
/>
203-
<UndoTextInput
202+
<TextInput
204203
style={[styles.input, { minWidth: 300, flexGrow: 1 }]}
205204
placeholderTextColor="#4157af"
206205
autoCapitalize="none"

Diff for: src/usecase/shared/UndoTextInput.tsx

-27
This file was deleted.

0 commit comments

Comments
 (0)