Print blocked property in listContacts and listGroups commands

This commit is contained in:
Daniel Schäufele 2020-01-07 00:49:32 +01:00
parent 67e94bc856
commit 48de8d9471
2 changed files with 5 additions and 5 deletions

View file

@ -20,7 +20,7 @@ public class ListContactsCommand implements LocalCommand {
} }
List<ContactInfo> contacts = m.getContacts(); List<ContactInfo> contacts = m.getContacts();
for (ContactInfo c : contacts) { for (ContactInfo c : contacts) {
System.out.println(String.format("Number: %s Name: %s", c.number, c.name)); System.out.println(String.format("Number: %s Name: %s Blocked: %b", c.number, c.name, c.blocked));
} }
return 0; return 0;
} }

View file

@ -14,11 +14,11 @@ public class ListGroupsCommand implements LocalCommand {
private static void printGroup(GroupInfo group, boolean detailed) { private static void printGroup(GroupInfo group, boolean detailed) {
if (detailed) { if (detailed) {
System.out.println(String.format("Id: %s Name: %s Active: %s Members: %s", System.out.println(String.format("Id: %s Name: %s Active: %s Blocked: %b Members: %s",
Base64.encodeBytes(group.groupId), group.name, group.active, group.members)); Base64.encodeBytes(group.groupId), group.name, group.active, group.blocked, group.members));
} else { } else {
System.out.println(String.format("Id: %s Name: %s Active: %s", Base64.encodeBytes(group.groupId), System.out.println(String.format("Id: %s Name: %s Active: %s Blocked: %b",
group.name, group.active)); Base64.encodeBytes(group.groupId), group.name, group.active, group.blocked));
} }
} }