Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33309466
D7592.1768804841.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D7592.1768804841.diff
View Options
diff --git a/native/account/registration/keyserver-selection.react.js b/native/account/registration/keyserver-selection.react.js
--- a/native/account/registration/keyserver-selection.react.js
+++ b/native/account/registration/keyserver-selection.react.js
@@ -21,12 +21,23 @@
};
// eslint-disable-next-line no-unused-vars
function KeyserverSelection(props: Props): React.Node {
+ const [customKeyserver, setCustomKeyserver] = React.useState('');
+ const customKeyserverTextInputRef = React.useRef();
+
const [currentSelection, setCurrentSelection] = React.useState<?Selection>();
const selectAshoat = React.useCallback(() => {
setCurrentSelection('ashoat');
+ customKeyserverTextInputRef.current?.blur();
}, []);
+ const customKeyserverEmpty = !customKeyserver;
const selectCustom = React.useCallback(() => {
setCurrentSelection('custom');
+ if (customKeyserverEmpty) {
+ customKeyserverTextInputRef.current?.focus();
+ }
+ }, [customKeyserverEmpty]);
+ const onCustomKeyserverFocus = React.useCallback(() => {
+ setCurrentSelection('custom');
}, []);
const styles = useStyles(unboundStyles);
@@ -68,9 +79,13 @@
<Text style={styles.tileTitleText}>Enter a keyserver</Text>
</RegistrationTileHeader>
<TextInput
+ value={customKeyserver}
+ onChangeText={setCustomKeyserver}
style={styles.keyserverInput}
placeholderTextColor={colors.panelSecondaryForegroundBorder}
placeholder="Keyserver"
+ onFocus={onCustomKeyserverFocus}
+ ref={customKeyserverTextInputRef}
/>
</RegistrationTile>
</RegistrationContainer>
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 19, 6:40 AM (17 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5954922
Default Alt Text
D7592.1768804841.diff (1 KB)
Attached To
Mode
D7592: [native] Connect selection state with TextInput state in KeyserverSelection
Attached
Detach File
Event Timeline
Log In to Comment