Skip to content

var listID: String #10

Description

@JCKL

In ContactsList.swift extension Contact

// In order for the list to update properly when fetch changes from the cloud, we need to use something other than the contact ID for the list item ID.
var listID: String { "\(self.id)\(Self.listIDSeparator)\(self.name)" }

The problem with this approach is when you start adding more fields to Contact. Your approach doesn't guarantee updates when changes are fetched.

I propose changing to the following:
var listID: String { "\(self.id)\(Self.listIDSeparator)\(self.userModificationDate)" }

In my testing, this solves all update issues regardless of adding fields to Contact.

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions