mirror of
https://github.com/balzack/databag.git
synced 2025-02-11 19:19:16 +00:00
only show offsync on connected contacts
This commit is contained in:
parent
e5fdfefcb7
commit
9d3dc383b1
@ -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",
|
||||
|
@ -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;
|
||||
}
|
||||
});
|
||||
|
@ -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>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user