[libcommhistory] Add a recipient event model to fetch events from unsaved numbers. Contributes to TJC#143264
As described in these TJC threads:
- https://together.jolla.com/question/132408/feature-request-activity-list-for-unsaved-numbers/
- https://together.jolla.com/question/143264/bug-past-communication-events-not-shown-for-unsaved-phone-numbers/
- https://together.jolla.com/question/162416/call-logs-not-showing-for-new-numbers-not-in-phonebook/
- https://together.jolla.com/question/189253/phone-record-named-unknown-and-call-history-missing-when-phone-number-is-not-saved-as-a-contact/
- https://together.jolla.com/question/209465/calls-activity-for-numbers-not-stored-in-contacts-feature-request/
- https://together.jolla.com/question/221741/call-history-numbers-not-saved-as-contacts-do-not-keep-activity-details/
It would be nice to have the activity listed for not saved contacts in the history of the voicecall-ui app. In fact, the history exists in the database, but is not shown.
It is due to the fact that singlecontacteventmodel.cpp is working only with saved contacts. But if one looks at the code, it is resolving the contact to get the phone details and use them as a WHERE clause in the request.
I'm proposing not to modify this singlecontacteventmodel class, but to introduce an intermediate class parent of it that is working on recipient localUID / remoteUID pairs. Then, the QML binding for contacteventmodel will inherit this recipienteventmodel and adding a property storing a raw phone number would allow to fetch the desired activity for not saved numbers.
What do you think about this approach ? @pvuorela or @Venemo ?
It requires also a two lines modification in sailfish-components-contacts/ContactActivityList.qml to declare the phone number instead of the contactid, when this latter is 0.