MsgDisplayUnlock();
- //Add Phone Log Data
+ /* Add Phone Log Data */
if ((err == MSG_SUCCESS) &&
(pMsgInfo->folderId == MSG_INBOX_ID || pMsgInfo->folderId == MSG_SPAMBOX_ID) &&
(pMsgInfo->msgType.mainType == MSG_SMS_TYPE) &&
#ifndef MSG_CONTACTS_SERVICE_NOT_SUPPORTED
MSG_DEBUG("Enter MsgAddPhoneLog() : pMsg->folderId [%d]", pMsgInfo->folderId);
MsgAddPhoneLog(pMsgInfo);
-#endif //MSG_CONTACTS_SERVICE_NOT_SUPPORTED
+#endif /* MSG_CONTACTS_SERVICE_NOT_SUPPORTED */
}
- // Auto delete
- //MsgStoAutoDeleteConversation(pMsgInfo->threadId);
+ int activated_conv_id = -1;
+ MsgSettingGetInt(VCONFKEY_MESSAGE_ACTIVATED_CONVERSATION_ID, &activated_conv_id);
+
+ if (activated_conv_id > 0 && (unsigned int)activated_conv_id == pMsgInfo->threadId) {
+ MSG_WARN("Update message read status of current activated thread. [%d]", pMsgInfo->threadId);
+ err = MsgStoUpdateReadStatus(pMsgInfo->msgId, true);
+ if (err != MSG_SUCCESS)
+ MSG_ERR("MsgStoUpdateReadStatus() is failed. err = %d", err);
+ }
+ /* Auto delete
+ MsgStoAutoDeleteConversation(pMsgInfo->threadId);
+ */
MSG_END();
app_control_h svc_h;
app_control_h active_noti_svc_h[MSG_ACTIVE_NOTI_BUTTON_NUM];
msg_message_id_t msg_id;
+ int conv_id;
unsigned char extra_data;
int sim_idx;
int active_noti_button_num;
"(CASE WHEN B.DPM_RESTRICTED = 0 THEN B.SUBJECT ELSE \"restricted message\" END), "
"(CASE WHEN B.DPM_RESTRICTED = 0 THEN B.MSG_TEXT ELSE \"restricted message\" END), "
"B.MAIN_TYPE, "
+ "B.CONV_ID, "
"(COUNT(DISTINCT(CASE WHEN B.MAIN_TYPE = %d THEN B.MSG_ID END))) AS SMS_UNREAD_CNT, "
"(COUNT(DISTINCT(CASE WHEN B.MAIN_TYPE = %d THEN B.MSG_ID END))) AS MMS_UNREAD_CNT, "
"(CASE WHEN B.MAIN_TYPE = %d AND B.NETWORK_STATUS = %d THEN (SELECT C.MSG_SIZE FROM %s C WHERE B.MSG_ID = C.MSG_ID) ELSE -1 END) "
}
if (row_cnt > 0) {
- smsUnreadCnt = atoi(db_res[col_cnt+6]);
- mmsUnreadCnt = atoi(db_res[col_cnt+7]);
- msgSize = atoi(db_res[col_cnt+8]);
+ smsUnreadCnt = atoi(db_res[col_cnt+7]);
+ mmsUnreadCnt = atoi(db_res[col_cnt+8]);
+ msgSize = atoi(db_res[col_cnt+9]);
noti_info->count = smsUnreadCnt + mmsUnreadCnt;
noti_info->msg_id = (msg_message_id_t)atoi(db_res[col_cnt+2]);
+ noti_info->conv_id = atoi(db_res[col_cnt+6]);
+
mainType = (unsigned char)atoi(db_res[col_cnt+5]);
if (mainType == MSG_MMS_TYPE) {
addServiceExtraData(noti_info->svc_h, "msgId", noti_info->msg_id);
addServiceExtraData(noti_info->svc_h, "http://tizen.org/appcontrol/data/notification", "new_message");
- noti_info->applist = NOTIFICATION_DISPLAY_APP_ALL^NOTIFICATION_DISPLAY_APP_TICKER;
-
if (noti_info->active_noti_button_num == 0)
noti_info->active_noti_button_num = 3;
+
+ int activated_conv_id = -1;
+ vconf_get_int(VCONFKEY_MESSAGE_ACTIVATED_CONVERSATION_ID, &activated_conv_id);
+
+ if (activated_conv_id == -1) {
+ noti_info->applist = NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY|NOTIFICATION_DISPLAY_APP_LOCK|NOTIFICATION_DISPLAY_APP_INDICATOR;
+ } else if (activated_conv_id == 0) {
+ noti_info->active_noti_button_num = 0;
+ noti_info->applist = NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY|NOTIFICATION_DISPLAY_APP_LOCK|NOTIFICATION_DISPLAY_APP_INDICATOR|NOTIFICATION_DISPLAY_APP_TICKER;
+ } else if (activated_conv_id > 0){
+ noti_info->active_noti_button_num = 0;
+
+ if (activated_conv_id != noti_info->conv_id)
+ noti_info->applist = NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY|NOTIFICATION_DISPLAY_APP_LOCK|NOTIFICATION_DISPLAY_APP_INDICATOR|NOTIFICATION_DISPLAY_APP_TICKER;
+ else
+ MSG_MGR_WARN("No adding Notification : activated conv id [%d] / notification conv id [%d]", activated_conv_id, noti_info->conv_id);
+ }
+
break;
}
case MSG_MGR_NOTI_TYPE_CB: {