(Contact c, Msg message)
| 1346 | //#endif |
| 1347 | |
| 1348 | public void messageStore(Contact c, Msg message) { |
| 1349 | if (c == null) { |
| 1350 | return; |
| 1351 | } |
| 1352 | |
| 1353 | c.addMessage(message); |
| 1354 | |
| 1355 | boolean autorespond = false; |
| 1356 | //#ifdef RUNNING_MESSAGE |
| 1357 | //# if (message.messageType==Msg.MESSAGE_TYPE_IN) |
| 1358 | //# setTicker(c, message.body); |
| 1359 | //#endif |
| 1360 | |
| 1361 | if (countNewMsgs()) { |
| 1362 | reEnumRoster(); |
| 1363 | } |
| 1364 | if (cf.autoScroll) { |
| 1365 | VirtualList list = VirtualCanvas.getInstance().getList(); |
| 1366 | if (list instanceof ContactMessageList) { |
| 1367 | if (((ContactMessageList) list).contact.compare(c) == 0) { |
| 1368 | if (c.cml == null) { |
| 1369 | return; |
| 1370 | } |
| 1371 | if (c.cml.on_end || message.messageType == Msg.MESSAGE_TYPE_OUT) { |
| 1372 | list.moveCursorEnd(); |
| 1373 | } |
| 1374 | } |
| 1375 | } |
| 1376 | } |
| 1377 | |
| 1378 | //TODO: clear unread flag if not-in-list IS HIDDEN |
| 1379 | |
| 1380 | if (c.getGroupType() == Groups.TYPE_IGNORE) { |
| 1381 | return; // no signalling/focus on ignore |
| 1382 | } |
| 1383 | if (message.messageType == Msg.MESSAGE_TYPE_AUTH && shouldNotify(c)) { |
| 1384 | Notification.getNotificator().sendNotify(c.getJid().toString(), message.from + "\n" + message.body); |
| 1385 | } |
| 1386 | |
| 1387 | if (cf.popupFromMinimized) { |
| 1388 | if (AlertCustomize.getInstance().vibrateOnlyHighlited) { |
| 1389 | if (message.highlite) { |
| 1390 | Notification.getNotificator().sendNotify(message.from, message.body); |
| 1391 | } |
| 1392 | } |
| 1393 | } |
| 1394 | |
| 1395 | if (message.highlite) { |
| 1396 | playNotify(SOUND_FOR_ME); |
| 1397 | if (shouldNotify(c)) { |
| 1398 | String body = (c.origin == Contact.ORIGIN_GROUPCHAT && cf.showNickNames) |
| 1399 | ? message.from + ":\n" + message.body |
| 1400 | : message.body; |
| 1401 | Notification.getNotificator().sendNotify(c.getJid().toString(), body); |
| 1402 | } |
| 1403 | autorespond = true; |
| 1404 | //#ifdef LIGHT_CONFIG |
| 1405 | //# CustomLight.message(); |
no test coverage detected