()
| 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; |
no test coverage detected