diff --git a/app/mobile/src/session/Session.jsx b/app/mobile/src/session/Session.jsx
index 75d415c3..94f78e84 100644
--- a/app/mobile/src/session/Session.jsx
+++ b/app/mobile/src/session/Session.jsx
@@ -49,24 +49,46 @@ export function Session() {
// tabbed containers
const ConversationStackScreen = () => {
+
+ const [selected, setSelected] = useState(null);
+ const setConversation = (navigation, cardId, channelId) => {
+ setSelected({ cardId, channelId });
+ navigation.navigate('conversation');
+ }
+ const clearConversation = (navigation) => {
+ navigation.goBack();
+ }
+ const setDetail = (navigation) => {
+ navigation.navigate('details');
+ }
+ const clearDetail = (navigation) => {
+ navigation.goBack();
+ }
+
return (
({ headerShown: false })}>
-
-
-
+
+ {(props) => }
+
+
+ {(props) => }
+
+
+ {(props) => }
+
);
}
- const ChannelsTabScreen = ({ navigation }) => {
+ const ChannelsTabScreen = ({ navigation, openConversation }) => {
return (
openConversation(navigation, cardId, channelId)} />
)
}
- const ConversationTabScreen = ({ navigation }) => {
- return closeConversation(navigation)} openDetails={() => openDetails(navigation)} />
+ const ConversationTabScreen = ({ navigation, channel, closeConversation, openDetails }) => {
+ return closeConversation(navigation)} openDetails={() => openDetails(navigation)} />
}
- const DetailsTabScreen = ({ navigation }) => {
- return closeDetails(navigation)} />
+ const DetailsTabScreen = ({ navigation, channel, closeDetails }) => {
+ return closeDetails(navigation)} />
}
const ProfileStackScreen = () => {
return (
@@ -129,10 +151,10 @@ export function Session() {
)
}
- const DetailDrawerContent = ({ navigation }) => {
+ const DetailDrawerContent = ({ channel, navigation }) => {
return (
- closeDetails(navigation)} />
+ {}} />
)
}
@@ -148,7 +170,16 @@ export function Session() {
)
}
- const HomeScreen = ({ cardNav, registryNav, detailNav, contactNav, profileNav }) => {
+ const HomeScreen = ({ cardNav, registryNav, detailNav, contactNav, profileNav, setConversation, setDetail }) => {
+
+ const [channel, setChannel] = useState(null);
+ const setTopic = (cardId, channelId) => {
+ setChannel({ cardId, channelId });
+ };
+ const clearTopic = () => {
+ setChannel(null);
+ };
+
return (
@@ -163,14 +194,14 @@ export function Session() {
- openConversation(null, cardId, channelId)} />
+
- { state.conversationId && (
- closeConversation(null)} openDetails={() => openDetails(detailNav)} />
+ { channel && (
+ setDetail(detailNav, channel)} />
)}
- { !state.conversationId && (
+ { !channel && (
)}
@@ -178,7 +209,7 @@ export function Session() {
)
}
- const CardDrawerScreen = ({ registryNav, detailNav, contactNav, profileNav, setContact }) => {
+ const CardDrawerScreen = ({ registryNav, detailNav, contactNav, profileNav, setContact, setDetail }) => {
const openRegistry = () => {
registryNav.openDrawer();
@@ -188,25 +219,25 @@ export function Session() {
}>
- {(props) => }
+ {(props) => }
);
};
- const RegistryDrawerScreen = ({ detailNav, contactNav, profileNav, setContact }) => {
+ const RegistryDrawerScreen = ({ detailNav, contactNav, profileNav, setContact, setDetail }) => {
return (
}>
- {(props) => }
+ {(props) => }
);
};
- const ContactDrawerScreen = ({ detailNav, profileNav }) => {
+ const ContactDrawerScreen = ({ detailNav, profileNav, setDetail }) => {
const [selected, setSelected] = useState(null);
const setContact = (navigation, contact) => {
@@ -218,32 +249,39 @@ export function Session() {
}>
- {(props) => setContact(props.navigation, contact)} />}
+ {(props) => setContact(props.navigation, contact)} setDetail={setDetail} />}
);
}
- const ProfileDrawerScreen = ({ detailNav }) => {
+ const DetailDrawerScreen = ({ profileNav }) => {
+
+ const [selected, setSelected] = useState(null);
+ const setDetail = (navigation, channel) => {
+ setSelected(channel);
+ navigation.openDrawer();
+ };
+
return (
- }>
-
- {(props) => }
-
-
+ }>
+
+ {(props) => }
+
+
);
}
return (
{ state.tabbed === false && (
- }>
-
- {(props) => }
-
-
+ }>
+
+ {(props) => }
+
+
)}
{ state.tabbed === true && (
@@ -27,7 +27,7 @@ export function Channels() {
}
+ renderItem={({ item }) => }
keyExtractor={item => (`${item.cardId}:${item.channelId}`)}
/>
>
@@ -45,7 +45,7 @@ export function Channels() {
}
+ renderItem={({ item }) => }
keyExtractor={item => (`${item.cardId}:${item.channelId}`)}
/>
diff --git a/app/mobile/src/session/channels/channelItem/ChannelItem.jsx b/app/mobile/src/session/channels/channelItem/ChannelItem.jsx
index 7ab21cd6..ea31739e 100644
--- a/app/mobile/src/session/channels/channelItem/ChannelItem.jsx
+++ b/app/mobile/src/session/channels/channelItem/ChannelItem.jsx
@@ -3,12 +3,12 @@ import { Logo } from 'utils/Logo';
import { styles } from './ChannelItem.styled';
import { useChannelItem } from './useChannelItem.hook';
-export function ChannelItem({ item }) {
+export function ChannelItem({ item, openConversation }) {
const { state, actions } = useChannelItem(item);
return (
-
+ openConversation(item.cardId, item.channelId)}>
{ item.subject }
diff --git a/app/mobile/src/session/conversation/Conversation.jsx b/app/mobile/src/session/conversation/Conversation.jsx
index 469194bc..7ce87a63 100644
--- a/app/mobile/src/session/conversation/Conversation.jsx
+++ b/app/mobile/src/session/conversation/Conversation.jsx
@@ -1,4 +1,23 @@
-export function Conversation() {
- return <>>
+import { View, TouchableOpacity, Text } from 'react-native';
+
+export function Conversation({ channel, closeConversation, openDetails }) {
+
+ return (
+
+ CHANNEL
+ { channel && (
+ <>
+ { channel.cardId }
+ { channel.channelId }
+ >
+ )}
+
+ DETAILS
+
+
+ CLOSE
+
+
+ );
}
diff --git a/app/mobile/src/session/details/Details.jsx b/app/mobile/src/session/details/Details.jsx
index e6c27388..8bc9c534 100644
--- a/app/mobile/src/session/details/Details.jsx
+++ b/app/mobile/src/session/details/Details.jsx
@@ -1,4 +1,19 @@
-export function Details() {
- return <>>
+import { View, Text, TouchableOpacity } from 'react-native';
+
+export function Details({ channel, closeDetails }) {
+ return (
+
+ DETAILS
+ { channel && (
+ <>
+ { channel.cardId }
+ { channel.channelId }
+ >
+ )}
+
+ CLOSE
+
+
+ )
}
diff --git a/app/mobile/src/session/profile/Profile.jsx b/app/mobile/src/session/profile/Profile.jsx
index 985bf340..e00bd69a 100644
--- a/app/mobile/src/session/profile/Profile.jsx
+++ b/app/mobile/src/session/profile/Profile.jsx
@@ -133,7 +133,7 @@ export function Profile() {
Manage Blocked Contacts
- Manager Blocked Topics
+ Manage Blocked Topics
diff --git a/app/mobile/src/session/profile/Profile.styled.js b/app/mobile/src/session/profile/Profile.styled.js
index 23b99a40..b5f2e081 100644
--- a/app/mobile/src/session/profile/Profile.styled.js
+++ b/app/mobile/src/session/profile/Profile.styled.js
@@ -23,6 +23,7 @@ export const styles = StyleSheet.create({
fontSize: 16,
paddingRight: 4,
textDecorationLine: 'underline',
+ color: Colors.primary,
},
camera: {
position: 'absolute',