diff --git a/app/mobile/src/session/Session.jsx b/app/mobile/src/session/Session.jsx index 4b119ff7..603952d6 100644 --- a/app/mobile/src/session/Session.jsx +++ b/app/mobile/src/session/Session.jsx @@ -10,7 +10,6 @@ import { useSession } from './useSession.hook'; import { styles } from './Session.styled'; import Colors from 'constants/Colors'; import { ProfileTitle, Profile } from './profile/Profile'; -import { Channels } from './channels/Channels'; import { CardsTitle, CardsBody, Cards } from './cards/Cards'; import { useCards } from './cards/useCards.hook'; import { RegistryTitle, RegistryBody, Registry } from './registry/Registry'; @@ -19,6 +18,8 @@ import { Contact, ContactTitle } from './contact/Contact'; import { Details } from './details/Details'; import { Conversation } from './conversation/Conversation'; import { Welcome } from './welcome/Welcome'; +import { ChannelsTitle, ChannelsBody, Channels } from './channels/Channels'; +import { useChannels } from './channels/useChannels.hook'; const ConversationStack = createStackNavigator(); const ProfileStack = createStackNavigator(); @@ -67,10 +68,16 @@ export function Session() { navigation.goBack(); } + const channels = useChannels(); + return ( - ({ headerShown: false })}> - - {(props) => } + ({ headerShown: true })}> + { console.log(props); return } + }}> + {(props) => setConversation(props.navigation, cardId, channelId)} />} {(props) => } @@ -81,11 +88,6 @@ export function Session() { ); } - const ChannelsTabScreen = ({ navigation, openConversation }) => { - return ( - openConversation(navigation, cardId, channelId)} /> - ) - } const ConversationTabScreen = ({ navigation, channel, closeConversation, openDetails }) => { return closeConversation(navigation)} openDetails={() => openDetails(navigation)} /> } @@ -320,9 +322,7 @@ export function Session() { tabBarActiveTintColor: Colors.white, tabBarInactiveTintColor: Colors.disabled, })}> - - {(props) => ()} - + diff --git a/app/mobile/src/session/channels/Channels.jsx b/app/mobile/src/session/channels/Channels.jsx index d7fa5d55..f113fa08 100644 --- a/app/mobile/src/session/channels/Channels.jsx +++ b/app/mobile/src/session/channels/Channels.jsx @@ -7,56 +7,59 @@ import { ChannelItem } from './channelItem/ChannelItem'; import Colors from 'constants/Colors'; import { SafeAreaProvider, SafeAreaView } from 'react-native-safe-area-context'; -export function Channels({ openConversation }) { - const { state, actions } = useChannels(); +export function ChannelsTitle({ state, actions }) { return ( - - { state.tabbed && ( - <> - - - - - - - - - New - - - } - keyExtractor={item => (`${item.cardId}:${item.channelId}`)} - /> - - )} - { !state.tabbed && ( - <> - - - - - - - - - } - keyExtractor={item => (`${item.cardId}:${item.channelId}`)} - /> - - - - - New Topic - - - - )} + + + + + + + + + New + + + ); +} + +export function ChannelsBody({ state, actions, openConversation }) { + return ( + } + keyExtractor={item => (`${item.cardId}:${item.channelId}`)} + /> + ); + +} + +export function Channels({ openConversation }) { + const { state, actions } = useChannels(); + return ( + + + + + + + + + + } + keyExtractor={item => (`${item.cardId}:${item.channelId}`)} + /> + + + + + New Topic + + ); } diff --git a/app/mobile/src/session/channels/Channels.styled.js b/app/mobile/src/session/channels/Channels.styled.js index f414fe00..bff21364 100644 --- a/app/mobile/src/session/channels/Channels.styled.js +++ b/app/mobile/src/session/channels/Channels.styled.js @@ -8,6 +8,12 @@ export const styles = StyleSheet.create({ display: 'flex', flexDirection: 'column', }, + title: { + display: 'flex', + flexDirection: 'row', + alignItems: 'center', + justifyContent: 'center', + }, topbar: { borderTopWidth: 1, borderBottomWidth: 1, @@ -32,6 +38,9 @@ export const styles = StyleSheet.create({ backgroundColor: Colors.white, alignItems: 'center', flexGrow: 1, + flexShrink: 1, + paddingTop: 4, + paddingBottom: 4, }, inputfield: { flex: 1, diff --git a/app/mobile/src/session/profile/Profile.jsx b/app/mobile/src/session/profile/Profile.jsx index f2160c65..e4584b5b 100644 --- a/app/mobile/src/session/profile/Profile.jsx +++ b/app/mobile/src/session/profile/Profile.jsx @@ -13,7 +13,9 @@ import { BlockedContacts } from './blockedContacts/BlockedContacts'; export function ProfileTitle(props) { const { state, actions } = useProfile(); return ( - { `${state.handle}@${state.node}` } + + { `${state.handle}@${state.node}` } + ) } diff --git a/app/mobile/src/session/profile/Profile.styled.js b/app/mobile/src/session/profile/Profile.styled.js index 831bfaf3..50de4be6 100644 --- a/app/mobile/src/session/profile/Profile.styled.js +++ b/app/mobile/src/session/profile/Profile.styled.js @@ -14,8 +14,16 @@ export const styles = StyleSheet.create({ drawer: { paddingTop: 16, }, - title: { + titleText: { fontSize: 18, + }, + title: { + display: 'flex', + flexDirection: 'column', + flexGrow: 1, + flex: 1, + width: '100%', + textAlign: 'start', }, body: { paddingTop: 16, @@ -29,8 +37,7 @@ export const styles = StyleSheet.create({ headerText: { fontSize: 16, paddingRight: 4, - textDecorationLine: 'underline', - color: Colors.primary, + color: Colors.text, }, camera: { position: 'absolute',