checking unread status

This commit is contained in:
balzack 2024-12-29 10:47:12 -08:00
parent ebc3855df3
commit 5e71a4cae6
7 changed files with 32 additions and 5 deletions

View File

@ -1,4 +1,5 @@
import {StyleSheet} from 'react-native';
import { Colors } from '../constants/Colors';
export const styles = StyleSheet.create({
contacts: {
@ -62,6 +63,10 @@ export const styles = StyleSheet.create({
alignItems: 'center',
justifyContent: 'center',
},
noneLabel: {
fontSize: 20,
color: Colors.placeholder,
},
cards: {
display: 'flex',
flexDirection: 'column',

View File

@ -188,7 +188,11 @@ export function Contacts({openRegistry, openContact}: {openRegistry: () => void;
keyExtractor={card => card.cardId}
/>
)}
{state.filtered.length === 0 && <Text style={styles.none}>{state.strings.noContacts}</Text>}
{state.filtered.length === 0 && (
<View style={styles.none}>
<Text style={styles.noneLabel}>{state.strings.noContacts}</Text>
</View>
)}
<Confirm show={alert} params={alertParams} />
</View>
);

View File

@ -28,6 +28,10 @@ export const styles = StyleSheet.create({
marginBottom: 0,
backgroundColor: 'transparent',
},
border: {
width: '100%',
height: 2,
},
header: {
display: 'flex',
flexDirection: 'row',

View File

@ -33,6 +33,11 @@ export function Conversation({close}: {close: ()=>void}) {
}
}
const onClose = () => {
actions.close();
close();
}
const onContent = (width, height) => {
const currentLead = state.topics.length > 0 ? state.topics[0].topicId : null;
if (scrolled.current) {
@ -66,7 +71,7 @@ export function Conversation({close}: {close: ()=>void}) {
<SafeAreaView style={styles.header}>
{close && (
<View style={styles.iconSpace}>
<IconButton style={styles.back} compact="true" mode="contained" icon="arrow-left" size={28} onPress={close} />
<IconButton style={styles.back} compact="true" mode="contained" icon="arrow-left" size={28} onPress={onClose} />
</View>
)}
<View style={styles.title}>

View File

@ -1,4 +1,5 @@
import {StyleSheet} from 'react-native';
import { Colors } from '../constants/Colors';
export const styles = StyleSheet.create({
registry: {
@ -71,6 +72,10 @@ export const styles = StyleSheet.create({
alignItems: 'center',
justifyContent: 'center',
},
noneLabel: {
fontSize: 20,
color: Colors.placeholder,
},
cards: {
display: 'flex',
flexDirection: 'column',

View File

@ -83,7 +83,11 @@ export function Registry({close, openContact}: {close: () => void; openContact:
keyExtractor={profile => profile.guid}
/>
)}
{state.profiles.length === 0 && <Text style={styles.none}>{state.strings.noContacts}</Text>}
{state.profiles.length === 0 && (
<View style={styles.none}>
<Text style={styles.noneLabel}>{state.strings.noContacts}</Text>
</View>
)}
</View>
);
}

View File

@ -243,8 +243,8 @@ export class OfflineStore implements Store {
}
public async getMarkers(guid: string, type: string): Promise<{id: string, value: string}[]> {
const markers = await this.getFilteredValues(guid, 'marker', ['type', 'id'], [{ field: 'type', value: type }]);
return markers.map(marker => ({ id: marker.id, value: marker.id }));
const markers = await this.getFilteredValues(guid, 'marker', ['value', 'id'], [{ field: 'type', value: type }]);
return markers.map(marker => ({ id: marker.id, value: marker.value }));
}
public async setLogin(login: Login): Promise<void> {