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

Method focusToNextUnreaded

src/main/java/Client/Roster.java:1781–1820  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1779 }
1780
1781 public void focusToNextUnreaded() {
1782 if (getItemCount() == 0) {
1783 return;
1784 }
1785 synchronized (hContacts) {
1786 int j = hContacts.size();
1787 for (int i = 0; i < j; i++) {
1788 Contact c = (Contact) hContacts.elementAt(i);
1789 c.setIncoming(Contact.INC_NONE);
1790 }
1791 }
1792
1793 redraw();
1794
1795 if (messageCount == 0) {
1796 return;
1797 }
1798
1799 Object atcursor = getFocusedObject();
1800 Contact c = (Contact) ((atcursor instanceof Contact) ? atcursor : hContacts.firstElement());
1801 Enumeration i = hContacts.elements();
1802
1803 int pass = 0; //
1804 while (pass < 2) {
1805 if (!i.hasMoreElements()) {
1806 i = hContacts.elements();
1807 }
1808 Contact p = (Contact) i.nextElement();
1809 if (pass == 1) {
1810 if (p.getNewMsgsCount() > 0) {
1811 focusToContact(p, true);
1812 setRotator();
1813 break;
1814 }
1815 }
1816 if (p == c) {
1817 pass++;
1818 }
1819 }
1820 }
1821
1822 public void logoff(String mess) {
1823 if (isLoggedIn()) {

Callers 2

doKeyActionMethod · 0.95
doUserKeyActionMethod · 0.95

Calls 9

setIncomingMethod · 0.95
getNewMsgsCountMethod · 0.95
focusToContactMethod · 0.95
getFocusedObjectMethod · 0.80
elementsMethod · 0.80
setRotatorMethod · 0.80
getItemCountMethod · 0.45
sizeMethod · 0.45
redrawMethod · 0.45

Tested by

no test coverage detected