Complete Enhanced Triple Migration Pattern for contact components
- Migrate ContactBulkActions, ContactInputForm, ContactListHeader, ContactListItem, LargeIdenticonModal, and ContactsView to PlatformServiceMixin - Add comprehensive deep linking support to CapacitorPlatformService and WebPlatformService - Enhance PlatformService with new database operations and deep link handling - Update service worker and documentation for migration progress - Fix TypeScript type errors in util.ts and deepLinks.ts - Streamline circular dependency analysis and migration tracking docs
This commit is contained in:
@@ -150,33 +150,43 @@ export default class ContactListItem extends Vue {
|
||||
/**
|
||||
* Get give amount for a specific contact and direction
|
||||
*/
|
||||
private getGiveAmountForContact(contactDid: string, isGivenToMe: boolean): number {
|
||||
private getGiveAmountForContact(
|
||||
contactDid: string,
|
||||
isGivenToMe: boolean,
|
||||
): number {
|
||||
if (this.showGiveTotals) {
|
||||
if (isGivenToMe) {
|
||||
return (this.givenToMeConfirmed[contactDid] || 0) +
|
||||
(this.givenToMeUnconfirmed[contactDid] || 0);
|
||||
return (
|
||||
(this.givenToMeConfirmed[contactDid] || 0) +
|
||||
(this.givenToMeUnconfirmed[contactDid] || 0)
|
||||
);
|
||||
} else {
|
||||
return (this.givenByMeConfirmed[contactDid] || 0) +
|
||||
(this.givenByMeUnconfirmed[contactDid] || 0);
|
||||
return (
|
||||
(this.givenByMeConfirmed[contactDid] || 0) +
|
||||
(this.givenByMeUnconfirmed[contactDid] || 0)
|
||||
);
|
||||
}
|
||||
} else if (this.showGiveConfirmed) {
|
||||
return isGivenToMe
|
||||
? (this.givenToMeConfirmed[contactDid] || 0)
|
||||
: (this.givenByMeConfirmed[contactDid] || 0);
|
||||
return isGivenToMe
|
||||
? this.givenToMeConfirmed[contactDid] || 0
|
||||
: this.givenByMeConfirmed[contactDid] || 0;
|
||||
} else {
|
||||
return isGivenToMe
|
||||
? (this.givenToMeUnconfirmed[contactDid] || 0)
|
||||
: (this.givenByMeUnconfirmed[contactDid] || 0);
|
||||
return isGivenToMe
|
||||
? this.givenToMeUnconfirmed[contactDid] || 0
|
||||
: this.givenByMeUnconfirmed[contactDid] || 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get give description for a specific contact and direction
|
||||
*/
|
||||
private getGiveDescriptionForContact(contactDid: string, isGivenToMe: boolean): string {
|
||||
return isGivenToMe
|
||||
? (this.givenToMeDescriptions[contactDid] || '')
|
||||
: (this.givenByMeDescriptions[contactDid] || '');
|
||||
private getGiveDescriptionForContact(
|
||||
contactDid: string,
|
||||
isGivenToMe: boolean,
|
||||
): string {
|
||||
return isGivenToMe
|
||||
? this.givenToMeDescriptions[contactDid] || ""
|
||||
: this.givenByMeDescriptions[contactDid] || "";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user