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

Method getNewMsgsCount

src/main/java/Client/Contact.java:258–280  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

256 }
257
258 public int getNewMsgsCount() {
259 if (msgs.isEmpty()) {
260 return 0;
261 }
262 /* if (newMsgCnt > 0) {
263 return newMsgCnt;
264 }*/
265 int nm = 0;
266 if (getGroupType() != Groups.TYPE_IGNORE) {
267 unreadType = Msg.MESSAGE_TYPE_IN;
268
269 for (Enumeration e = msgs.elements(); e.hasMoreElements();) {
270 Msg m = ((MessageItem) e.nextElement()).msg;
271 if (m.unread) {
272 nm++;
273 if (m.messageType == Msg.MESSAGE_TYPE_AUTH) {
274 unreadType = m.messageType;
275 }
276 }
277 }
278 }
279 return newMsgCnt = nm;
280 }
281
282 public final boolean hasNewMsgs() {
283 return getNewMsgsCount() > 0;

Callers 8

hasNewMsgsMethod · 0.95
getTipStringMethod · 0.95
getSecImageIndexMethod · 0.95
focusToNextUnreadedMethod · 0.95
countNewMsgsMethod · 0.95
cleanupGroupMethod · 0.95
focusToNextUnreadedMethod · 0.95
addContactMethod · 0.80

Calls 3

getGroupTypeMethod · 0.95
elementsMethod · 0.80
isEmptyMethod · 0.45

Tested by

no test coverage detected