diff --git a/app/mobile/src/session/Session.jsx b/app/mobile/src/session/Session.jsx index ee54e2be..d373553b 100644 --- a/app/mobile/src/session/Session.jsx +++ b/app/mobile/src/session/Session.jsx @@ -47,6 +47,7 @@ export function Session() { const [cardId, setCardId] = useState(); const [channelId, setChannelId] = useState(); +console.log("REnDER CONVERSATION STACK"); const openConversation = (navigation, card, channel) => { (async () => { conversation.actions.setConversation(card, channel); @@ -72,33 +73,37 @@ export function Session() { } return ( - (screenParams)} > + + (screenParams)} > - - {(props) => openConversation(props.navigation, cardId, channelId)} />} - + + {(props) => openConversation(props.navigation, cardId, channelId)} />} + - - {(props) => openDetails(props.navigation)} closeConversation={(pop) => closeConversation(props.navigation, pop)} /> } - + + {(props) => openDetails(props.navigation)} closeConversation={(pop) => closeConversation(props.navigation, pop)} /> } + - ( - Details - )}}> - {(props) =>
clearConversation(props.navigation)} />} - + ( + Details + )}}> + {(props) =>
clearConversation(props.navigation)} />} + - + + ); } const ProfileStackScreen = () => { return ( - (screenParams)}> - }}> - {(props) => } - - + + (screenParams)}> + }}> + {(props) => } + + + ); } @@ -126,27 +131,29 @@ export function Session() { } return ( - (screenParams)} initialRouteName="cards"> + + (screenParams)} initialRouteName="cards"> - ( - - )}}> - {(props) => openContact(props.navigation, contact)} />} - + ( + + )}}> + {(props) => openContact(props.navigation, contact)} />} + - ( - - )}}> - {(props) => } - + ( + + )}}> + {(props) => } + - ( - - )}}> - {(props) => openContact(props.navigation, contact)} />} - + ( + + )}}> + {(props) => openContact(props.navigation, contact)} />} + - + + ); } @@ -297,6 +304,8 @@ export function Session() { ); } +console.log("RENDER ROOT", state.tabbed); + return ( diff --git a/app/mobile/src/session/conversation/Conversation.jsx b/app/mobile/src/session/conversation/Conversation.jsx index a07e33bd..ba164770 100644 --- a/app/mobile/src/session/conversation/Conversation.jsx +++ b/app/mobile/src/session/conversation/Conversation.jsx @@ -1,5 +1,5 @@ import { useRef, useEffect, useState, useContext } from 'react'; -import { Alert, Modal, KeyboardAvoidingView, ActivityIndicator, FlatList, View, TextInput, Text, TouchableOpacity } from 'react-native'; +import { Alert, Platform, Modal, KeyboardAvoidingView, ActivityIndicator, FlatList, View, TextInput, Text, TouchableOpacity } from 'react-native'; import { ConversationContext } from 'context/ConversationContext'; import { useConversation } from './useConversation.hook'; import { styles } from './Conversation.styled'; @@ -49,10 +49,13 @@ export function Conversation({ navigation, cardId, channelId, closeConversation, }, [navigation, state.subject, state.loaded]); useEffect(() => { +console.log("RESET CONVERSATION!"); return () => { closeConversation(); }; }, []); return ( + { !navigation && ( @@ -127,5 +130,6 @@ export function Conversation({ navigation, cardId, channelId, closeConversation, + ); } diff --git a/app/mobile/src/session/conversation/addTopic/AddTopic.jsx b/app/mobile/src/session/conversation/addTopic/AddTopic.jsx index 254dcc1d..893313ac 100644 --- a/app/mobile/src/session/conversation/addTopic/AddTopic.jsx +++ b/app/mobile/src/session/conversation/addTopic/AddTopic.jsx @@ -16,7 +16,6 @@ import { ImageFile } from './imageFile/ImageFile'; export function AddTopic({ contentKey }) { const { state, actions } = useAddTopic(contentKey); - const message = useRef(); const addImage = async () => { try { @@ -31,7 +30,6 @@ export function AddTopic({ contentKey }) { const sendMessage = async () => { try { if (state.message || state.assets.length > 0) { - message.current.blur(); await actions.addTopic(); } } @@ -127,9 +125,9 @@ export function AddTopic({ contentKey }) { renderItem={renderAsset} /> )} - { !state.locked && state.enableImage && ( diff --git a/app/mobile/src/session/useSession.hook.js b/app/mobile/src/session/useSession.hook.js index 887f7f30..4e039f08 100644 --- a/app/mobile/src/session/useSession.hook.js +++ b/app/mobile/src/session/useSession.hook.js @@ -38,10 +38,12 @@ export function useSession() { if (dimensions.width > config.tabbedWidth) { const width = Math.floor((dimensions.width * 33) / 100); tabbed.current = false; +console.log("SET TABBED: false"); updateState({ tabbed: false, baseWidth: width + 50, subWidth: width }); } else { tabbed.current = true; +console.log("SET TABBED: true"); updateState({ tabbed: true }); } }