diff --git a/app/mobile/src/session/Session.jsx b/app/mobile/src/session/Session.jsx
index 9227b19d..e70d83e5 100644
--- a/app/mobile/src/session/Session.jsx
+++ b/app/mobile/src/session/Session.jsx
@@ -138,6 +138,7 @@ function ContactStackScreen({ addChannel }) {
const [contact, setContact] = useState(null);
+ const [editable, setEditable] = useState(false);
const [search, setSearch] = useState(null);
const [handle, setHandle] = useState();
const [server, setServer] = useState();
@@ -147,6 +148,12 @@ function ContactStackScreen({ addChannel }) {
navigation.navigate('contact')
}
const openRegistry = (navigation) => {
+ if (profile.state.identity?.node) {
+ setEditable(true);
+ }
+ else {
+ setEditable(false);
+ }
setServer(profile.state.server);
setHandle(null);
setSearch(false);
@@ -166,7 +173,7 @@ function ContactStackScreen({ addChannel }) {
(
-
+
)}}>
{(props) => openContact(props.navigation, contact)} />}
diff --git a/app/mobile/src/session/cards/useCards.hook.js b/app/mobile/src/session/cards/useCards.hook.js
index 1d1271f5..4dfc0dd1 100644
--- a/app/mobile/src/session/cards/useCards.hook.js
+++ b/app/mobile/src/session/cards/useCards.hook.js
@@ -45,7 +45,7 @@ export function useCards() {
cardId: cardId,
name: name,
handle: handle,
- username: `${handle}/${node}`,
+ username: node ? `${handle}/${node}` : handle,
node: node,
guid: guid,
location: location,
diff --git a/app/mobile/src/session/channels/addMember/useAddMember.hook.js b/app/mobile/src/session/channels/addMember/useAddMember.hook.js
index b4c0e123..0d484dd8 100644
--- a/app/mobile/src/session/channels/addMember/useAddMember.hook.js
+++ b/app/mobile/src/session/channels/addMember/useAddMember.hook.js
@@ -25,7 +25,8 @@ export function useAddMember(item, members) {
useEffect(() => {
const { cardId, revision, profile } = item;
const { name, handle, node } = profile;
- updateState({ cardId, name, handle: `${handle}/${node}`,
+ const username = node ? `${handle}/${node}` : handle;
+ updateState({ cardId, name, handle: username,
logo: profile.imageSet ? card.actions.getCardImageUrl(cardId) : 'avatar' });
}, [card.state]);
diff --git a/app/mobile/src/session/registry/Registry.jsx b/app/mobile/src/session/registry/Registry.jsx
index 0249fc12..4ce111a1 100644
--- a/app/mobile/src/session/registry/Registry.jsx
+++ b/app/mobile/src/session/registry/Registry.jsx
@@ -7,12 +7,12 @@ import { ProfileContext } from 'context/ProfileContext';
import Colors from 'constants/Colors';
import Ionicons from 'react-native-vector-icons/AntDesign';
-export function RegistryHeader({ search, setSearch, handle, setHandle, server, setServer }) {
+export function RegistryHeader({ search, setSearch, handle, setHandle, server, setServer, editable }) {
return (
-
{ !search && (
@@ -60,9 +60,16 @@ export function Registry({ closeRegistry, openContact }) {
const [search, setSearch] = useState(false);
const [handle, setHandle] = useState();
const [server, setServer] = useState();
+ const [editable, setEditable] = useState(false);
const profile = useContext(ProfileContext);
useEffect(() => {
+ if (profile.state.identity?.node) {
+ setEditable(true);
+ }
+ else {
+ setEditable(false);
+ }
setSearch(false);
setHandle(null);
setServer(profile.state.server);
@@ -71,7 +78,7 @@ export function Registry({ closeRegistry, openContact }) {
return (
-
+
diff --git a/app/mobile/src/session/registry/useRegistry.hook.js b/app/mobile/src/session/registry/useRegistry.hook.js
index f4cf77ae..707eade0 100644
--- a/app/mobile/src/session/registry/useRegistry.hook.js
+++ b/app/mobile/src/session/registry/useRegistry.hook.js
@@ -47,7 +47,7 @@ export function useRegistry(search, handle, server) {
const { guid, name, handle, node, location, description, imageSet } = item;
const server = node ? node : profile.state.server;
const logo = imageSet ? getListingImageUrl(server, guid) : 'avatar';
- const username = `${handle}/${node}`;
+ const username = node ? `${handle}/${node}` : handle;
return { guid, name, handle, username, node: server, location, description, guid, imageSet, logo };
};