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 ( + <> + + You may delete offline keyservers from your keyserver list. When you + delete a keyserver, you will still remain in the associated + communities. + + + Any messages or content you have previously sent will remain on the + keyserver’s communities after disconnecting or deleting. + + + + ); + } + return ( + <> + + Disconnecting from this keyserver will remove you from its associated + communities. + + + Any messages or content you have previously sent will remain on the + keyserver. + + + + ); + }, [ + keyserverInfo.connection.status, + onPressRemoveKeyserver, + styles.keyserverRemoveText, + styles.removeButtonContainer, + styles.removeButtonText, + ]); + return ( @@ -70,20 +120,7 @@ {keyserverInfo.urlPrefix} - - Disconnecting from this keyserver will remove you from its associated - communities. - - - Any messages or content you have previously sent will remain on the - keyserver. - - + {removeKeyserver} );