use of cx.ring.model.CallContact in project ring-client-android by savoirfairelinux.
the class ContactService method getContacts.
private Collection<CallContact> getContacts() {
List<CallContact> contacts = new ArrayList<>(mContactList.values());
List<CallContact> contactsRing = new ArrayList<>(mContactsRing.values());
for (CallContact contact : contacts) {
if (!contactsRing.contains(contact)) {
contactsRing.add(contact);
}
}
return contactsRing;
}
use of cx.ring.model.CallContact in project ring-client-android by savoirfairelinux.
the class ContactService method setRingContactName.
public boolean setRingContactName(String accountId, Uri uri, String name) {
if (!accountId.equals(mAccountId)) {
return false;
}
Log.w(TAG, "setRingContactName " + uri + " " + name);
CallContact contact = findContact(uri);
if (contact != null) {
contact.setUsername(name);
return true;
}
return false;
}
use of cx.ring.model.CallContact in project ring-client-android by savoirfairelinux.
the class SmartListPresenter method deleteConversation.
public void deleteConversation(SmartListViewModel smartListViewModel) {
CallContact callContact = mContactService.getContact(new Uri(smartListViewModel.getUuid()));
getView().displayDeleteDialog(callContact);
}
use of cx.ring.model.CallContact in project ring-client-android by savoirfairelinux.
the class SmartListPresenter method copyNumber.
public void copyNumber(SmartListViewModel smartListViewModel) {
CallContact callContact = mContactService.getContact(new Uri(smartListViewModel.getUuid()));
getView().copyNumber(callContact);
}
use of cx.ring.model.CallContact in project ring-client-android by savoirfairelinux.
the class MainPresenter method refreshContact.
private void refreshContact(String buddy) {
for (int i = 0; i < mTvListViewModels.size(); i++) {
TVListViewModel tvListViewModel = mTvListViewModels.get(i);
CallContact callContact = tvListViewModel.getCallContact();
if (callContact.getIds().get(0).equals("ring:" + buddy)) {
TVListViewModel updatedTvListViewModel = new TVListViewModel(callContact, mPresenceService.isBuddyOnline(callContact.getIds().get(0)));
if (!updatedTvListViewModel.equals(tvListViewModel)) {
getView().refreshContact(i, updatedTvListViewModel);
}
}
}
}
Aggregations