small layout tweaks

This commit is contained in:
balzack 2025-01-06 20:36:49 -08:00
parent ed860e4643
commit 11395b4e28
4 changed files with 18 additions and 10 deletions

View File

@ -38,7 +38,7 @@ export function Content({openConversation, textCard}: {openConversation: ()=>voi
setAdding(true);
try {
const id = await actions.openTopic(cardId);
actions.setFocus(null, id);
await actions.setFocus(null, id);
openConversation();
} catch (err) {
console.log(err);
@ -59,7 +59,7 @@ export function Content({openConversation, textCard}: {openConversation: ()=>voi
setSubjectTopic('');
setMembers([]);
setSealedTopic(false);
actions.setFocus(null, id);
await actions.setFocus(null, id);
openConversation();
} catch (err) {
console.log(err);

View File

@ -9,8 +9,8 @@ const SETTINGS_DB = 'ls_v001.db';
const databag = new DatabagSDK(
{
tagBatch: 32,
topicBatch: 32,
tagBatch: 24,
topicBatch: 24,
articleTypes: [],
channelTypes: ['sealed', 'superbasic'],
},

View File

@ -204,11 +204,11 @@ export function Conversation({close}: {close: ()=>void}) {
)}
</View>
<View style={styles.status}>
{ state.detailSet && (
{ state.detailSet && !state.access && (
<Icon source="alert-circle-outline" size={20} color={Colors.offsync} />
)}
{ state.detailSet && state.host && (
<Icon source="home-outline" size={20} />
<Icon source="home-outline" size={22} />
)}
{ state.detailSet && !state.host && (
<Icon source="server" size={20} />

View File

@ -41,7 +41,6 @@ export function Session() {
const textContact = (cardId: null|string) => {
setTextCard({ cardId });
setTab('content')
}
const dismiss = () => {
@ -51,6 +50,10 @@ export function Session() {
}, 60000);
}
const contentTab = () => {
setTab('content');
}
return (
<View style={styles.session}>
{state.layout !== 'large' && (
@ -62,7 +65,7 @@ export function Session() {
...styles.body,
...showContent,
}}>
<ContentTab textCard={textCard} scheme={scheme} />
<ContentTab textCard={textCard} scheme={scheme} contentTab={contentTab} />
</View>
<View
style={{
@ -174,13 +177,18 @@ export function Session() {
);
}
function ContentTab({scheme, textCard}: {scheme: string, textCard: {cardId: null|string}}) {
function ContentTab({scheme, textCard, contentTab}: {scheme: string, textCard: {cardId: null|string}, contentTab: ()=>void}) {
const openConversation = (props) => {
props.navigation.navigate('conversation');
contentTab();
}
return (
<NavigationContainer theme={scheme === 'dark' ? DarkTheme : DefaultTheme}>
<ContentStack.Navigator initialRouteName="contacts" screenOptions={{headerShown: false}}>
<ContentStack.Screen name="content" options={{headerBackTitleVisible: false}}>
{props => (
<Content textCard={textCard} openConversation={()=>props.navigation.navigate('conversation')} />
<Content textCard={textCard} openConversation={()=>openConversation(props)} />
)}
</ContentStack.Screen>
<ContentStack.Screen name="conversation"