Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3516182
D9794.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D9794.diff
View Options
diff --git a/native/profile/keyserver-selection-bottom-sheet.react.js b/native/profile/keyserver-selection-bottom-sheet.react.js
--- a/native/profile/keyserver-selection-bottom-sheet.react.js
+++ b/native/profile/keyserver-selection-bottom-sheet.react.js
@@ -54,6 +54,56 @@
// TODO
}, []);
+ const removeKeyserver = React.useMemo(() => {
+ if (keyserverInfo.connection.status !== 'connected') {
+ return (
+ <>
+ <Text style={styles.keyserverRemoveText}>
+ You may delete offline keyservers from your keyserver list. When you
+ delete a keyserver, you will still remain in the associated
+ communities.
+ </Text>
+ <Text style={styles.keyserverRemoveText}>
+ Any messages or content you have previously sent will remain on the
+ keyserver’s communities after disconnecting or deleting.
+ </Text>
+ <Button
+ style={styles.removeButtonContainer}
+ onPress={onPressRemoveKeyserver}
+ >
+ <Text style={styles.removeButtonText}>
+ Delete keyserver from list
+ </Text>
+ </Button>
+ </>
+ );
+ }
+ return (
+ <>
+ <Text style={styles.keyserverRemoveText}>
+ Disconnecting from this keyserver will remove you from its associated
+ communities.
+ </Text>
+ <Text style={styles.keyserverRemoveText}>
+ Any messages or content you have previously sent will remain on the
+ keyserver.
+ </Text>
+ <Button
+ style={styles.removeButtonContainer}
+ onPress={onPressRemoveKeyserver}
+ >
+ <Text style={styles.removeButtonText}>Disconnect keyserver</Text>
+ </Button>
+ </>
+ );
+ }, [
+ keyserverInfo.connection.status,
+ onPressRemoveKeyserver,
+ styles.keyserverRemoveText,
+ styles.removeButtonContainer,
+ styles.removeButtonText,
+ ]);
+
return (
<BottomSheet ref={bottomSheetRef} onClosed={goBack}>
<View style={styles.container}>
@@ -70,20 +120,7 @@
</View>
<Text style={styles.keyserverURLText}>{keyserverInfo.urlPrefix}</Text>
</View>
- <Text style={styles.keyserverRemoveText}>
- Disconnecting from this keyserver will remove you from its associated
- communities.
- </Text>
- <Text style={styles.keyserverRemoveText}>
- Any messages or content you have previously sent will remain on the
- keyserver.
- </Text>
- <Button
- style={styles.removeButtonContainer}
- onPress={onPressRemoveKeyserver}
- >
- <Text style={styles.removeButtonText}>Disconnect keyserver</Text>
- </Button>
+ {removeKeyserver}
</View>
</BottomSheet>
);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Dec 23, 12:41 PM (19 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2694719
Default Alt Text
D9794.diff (2 KB)
Attached To
Mode
D9794: [native] update remove keyserver text based on connection status
Attached
Detach File
Event Timeline
Log In to Comment