reverted listgroups/listcontacts

This commit is contained in:
Adimarantis 2021-02-19 09:53:31 +01:00
parent dfb299297a
commit 84a1bfad26
2 changed files with 6 additions and 32 deletions

View file

@ -41,10 +41,6 @@ public interface Signal extends DBusInterface {
List<byte[]> getGroupIds();
List<String> listGroups();
List<String> listContacts();
String getGroupName(byte[] groupId);
List<String> getGroupMembers(byte[] groupId);

View file

@ -266,26 +266,4 @@ public class DbusSignalImpl implements Signal {
}
}
@Override
public List<String> listGroups() {
List<GroupInfo> groups = m.getGroups();
List<String> gr = new ArrayList<>(groups.size());
for (GroupInfo group : groups) {
String entry="group="+group.getTitle()+" active:"+group.isMember(m.getSelfAddress())+" blocked:"+group.isBlocked();
gr.add(entry);
}
return gr;
}
@Override
public List<String> listContacts() {
List<ContactInfo> contacts = m.getContacts();
List<String> cc = new ArrayList<>(contacts.size());
for (ContactInfo c : contacts) {
String entry="number:"+c.number+" name:"+c.name+" blocked:"+c.blocked;
cc.add(entry);
}
return cc;
}
}