only show offsync on connected contacts

This commit is contained in:
Roland Osborne 2023-05-08 10:40:43 -07:00
parent e5fdfefcb7
commit 9d3dc383b1
3 changed files with 9 additions and 8 deletions

View File

@ -622,7 +622,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.13;
MARKETING_VERSION = 1.15;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
@ -656,7 +656,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.13;
MARKETING_VERSION = 1.15;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",

View File

@ -22,7 +22,7 @@ export function useCardIcon() {
if (status === 'pending' || status === 'requested') {
requested = true;
}
if (item.card?.offsync) {
if (item.card?.offsync && status === 'connected') {
offsync = true;
}
});

View File

@ -12,6 +12,7 @@ export function ContactHeader({ contact }) {
}
export function ContactBody({ contact }) {
const { state, actions } = useContact(contact);
const getStatusText = (status) => {
@ -198,6 +199,11 @@ export function ContactBody({ contact }) {
<TouchableOpacity style={styles.button} onPress={reportContact}>
<Text style={styles.buttonText}>Report Contact</Text>
</TouchableOpacity>
{ state.offsync && (
<TouchableOpacity style={styles.alert} onPress={actions.resync}>
<Text>Resync Contact</Text>
</TouchableOpacity>
)}
</>
)}
{ state.status === 'connecting' && (
@ -286,11 +292,6 @@ export function ContactBody({ contact }) {
</TouchableOpacity>
</>
)}
{ state.offsync && (
<TouchableOpacity style={styles.alert} onPress={actions.resync}>
<Text style={styles.alertText}>Resync Contact</Text>
</TouchableOpacity>
)}
</View>
</View>
);