mirror of
https://github.com/balzack/databag.git
synced 2025-02-12 03:29:16 +00:00
only show offsync on connected contacts
This commit is contained in:
parent
e5fdfefcb7
commit
9d3dc383b1
@ -622,7 +622,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.13;
|
MARKETING_VERSION = 1.15;
|
||||||
OTHER_LDFLAGS = (
|
OTHER_LDFLAGS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"-ObjC",
|
"-ObjC",
|
||||||
@ -656,7 +656,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.13;
|
MARKETING_VERSION = 1.15;
|
||||||
OTHER_LDFLAGS = (
|
OTHER_LDFLAGS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"-ObjC",
|
"-ObjC",
|
||||||
|
@ -22,7 +22,7 @@ export function useCardIcon() {
|
|||||||
if (status === 'pending' || status === 'requested') {
|
if (status === 'pending' || status === 'requested') {
|
||||||
requested = true;
|
requested = true;
|
||||||
}
|
}
|
||||||
if (item.card?.offsync) {
|
if (item.card?.offsync && status === 'connected') {
|
||||||
offsync = true;
|
offsync = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -12,6 +12,7 @@ export function ContactHeader({ contact }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function ContactBody({ contact }) {
|
export function ContactBody({ contact }) {
|
||||||
|
|
||||||
const { state, actions } = useContact(contact);
|
const { state, actions } = useContact(contact);
|
||||||
|
|
||||||
const getStatusText = (status) => {
|
const getStatusText = (status) => {
|
||||||
@ -198,6 +199,11 @@ export function ContactBody({ contact }) {
|
|||||||
<TouchableOpacity style={styles.button} onPress={reportContact}>
|
<TouchableOpacity style={styles.button} onPress={reportContact}>
|
||||||
<Text style={styles.buttonText}>Report Contact</Text>
|
<Text style={styles.buttonText}>Report Contact</Text>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
|
{ state.offsync && (
|
||||||
|
<TouchableOpacity style={styles.alert} onPress={actions.resync}>
|
||||||
|
<Text>Resync Contact</Text>
|
||||||
|
</TouchableOpacity>
|
||||||
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{ state.status === 'connecting' && (
|
{ state.status === 'connecting' && (
|
||||||
@ -286,11 +292,6 @@ export function ContactBody({ contact }) {
|
|||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{ state.offsync && (
|
|
||||||
<TouchableOpacity style={styles.alert} onPress={actions.resync}>
|
|
||||||
<Text style={styles.alertText}>Resync Contact</Text>
|
|
||||||
</TouchableOpacity>
|
|
||||||
)}
|
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user