mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-24 09:42:17 -05:00
implementet missing methods on the new roster mgmt
This commit is contained in:
parent
f0d2ca260e
commit
ad960b393d
@ -31,12 +31,23 @@ public class Roster {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void clearPresences() {
|
public void clearPresences() {
|
||||||
// TODO Auto-generated method stub
|
for(Contact contact : getContacts()) {
|
||||||
|
contact.clearPresences();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void markAllAsNotInRoster() {
|
public void markAllAsNotInRoster() {
|
||||||
|
for(Contact contact : getContacts()) {
|
||||||
|
contact.resetOption(Contact.Options.IN_ROSTER);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void clearSystemAccounts() {
|
||||||
|
for(Contact contact : getContacts()) {
|
||||||
|
contact.setPhotoUri(null);
|
||||||
|
contact.setSystemName(null);
|
||||||
|
contact.setSystemAccount(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Contact> getContacts() {
|
public List<Contact> getContacts() {
|
||||||
|
@ -894,6 +894,9 @@ public class XmppConnectionService extends Service {
|
|||||||
new OnPhoneContactsLoadedListener() {
|
new OnPhoneContactsLoadedListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onPhoneContactsLoaded(List<Bundle> phoneContacts) {
|
public void onPhoneContactsLoaded(List<Bundle> phoneContacts) {
|
||||||
|
for(Account account : accounts) {
|
||||||
|
account.getRoster().clearSystemAccounts();
|
||||||
|
}
|
||||||
for (Bundle phoneContact : phoneContacts) {
|
for (Bundle phoneContact : phoneContacts) {
|
||||||
for (Account account : accounts) {
|
for (Account account : accounts) {
|
||||||
String jid = phoneContact.getString("jid");
|
String jid = phoneContact.getString("jid");
|
||||||
|
Loading…
Reference in New Issue
Block a user