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

Method countNewMsgs

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

Source from the content-addressed store, hash-verified

345 }
346
347 boolean countNewMsgs() {
348 int m = 0;
349 int h = 0;
350 synchronized (hContacts) {
351 int j = hContacts.size();
352 for (int i = 0; i < j; i++) {
353 Contact c = (Contact) hContacts.elementAt(i);
354 if (c.origin == Contact.ORIGIN_GROUPCHAT) {
355 h += c.getNewHighliteMsgsCount();
356 } else {
357 h += c.getNewMsgsCount();
358 }
359 m += c.getNewMsgsCount();
360 }
361 }
362 highliteMessageCount = h;
363 messageCount = m;
364//#ifdef android
365 if (highliteMessageCount < 1) {
366 Notification.getNotificator().clear();
367 }
368//#endif
369 if (h == m) {
370 h = 0;
371 }
372 updateMainBar();
373 return (m > 0);
374 }
375
376 public void cleanupSearch() {
377 int index = 0;

Callers 5

showMethod · 0.95
removeTrashMethod · 0.95
messageStoreMethod · 0.95
deleteContactMethod · 0.95
markReadMethod · 0.80

Calls 6

getNewMsgsCountMethod · 0.95
getNotificatorMethod · 0.95
updateMainBarMethod · 0.95
clearMethod · 0.65
sizeMethod · 0.45

Tested by

no test coverage detected