MCPcopy Index your code
hub / github.com/BombusMod/BombusMod / getFirstContactWithNewHighlite

Method getFirstContactWithNewHighlite

src/main/java/Client/Roster.java:785–808  ·  view source on GitHub ↗
(Contact contact)

Source from the content-addressed store, hash-verified

783 }
784
785 public Contact getFirstContactWithNewHighlite(Contact contact) {
786 if (hContacts.isEmpty()) {
787 return null;
788 }
789 if (null == contact) {
790 contact = (Contact) hContacts.firstElement();
791 }
792 for (int index = hContacts.indexOf(contact) + 1; index < hContacts.size(); ++index) {
793 Contact c = (Contact) hContacts.elementAt(index);
794 if (c.getNewHighliteMsgsCount() > 0 || (c.origin != Contact.ORIGIN_GROUPCHAT && c.hasNewMsgs())) {
795 return c;
796 }
797 }
798 for (int index = 0; index < hContacts.size(); ++index) {
799 Contact c = (Contact) hContacts.elementAt(index);
800 if (c.getNewHighliteMsgsCount() > 0 || (c.origin != Contact.ORIGIN_GROUPCHAT && c.hasNewMsgs())) {
801 return c;
802 }
803 }
804 if (contact.getNewHighliteMsgsCount() > 0 || (contact.origin != Contact.ORIGIN_GROUPCHAT && contact.hasNewMsgs())) {
805 return contact;
806 }
807 return null;
808 }
809//#ifdef JUICK
810/*
811 * public Vector getJuickContacts(boolean str) { Vector juickContacts = new

Callers 1

onNewIntentMethod · 0.80

Calls 4

hasNewMsgsMethod · 0.95
isEmptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected