[P170130-01455] set number of button for only latest message 20/112320/1
authorKyeonghun Lee <kh9090.lee@samsung.com>
Tue, 31 Jan 2017 07:40:42 +0000 (16:40 +0900)
committerKyeonghun Lee <kh9090.lee@samsung.com>
Tue, 31 Jan 2017 07:40:42 +0000 (16:40 +0900)
Change-Id: I9b9c358a357ffc02ca1ff91a25b4e96508f2c2dd
Signed-off-by: Kyeonghun Lee <kh9090.lee@samsung.com>
manager/src/msg-manager-notification.cpp

index 1df9d17..6f4e50a 100644 (file)
@@ -1845,18 +1845,21 @@ int getLatestMsgInfo(MSG_MGR_NOTI_INFO_S *noti_info, bool isForInstantMessage)
                                if (subType == MSG_CB_SMS) {
                                        senderStr = get_translate_text(MSG_MGR_PACKAGE_NAME, MSG_MGR_LOCALEDIR, CB_MESSAGE);
                                        g_strlcat(noti_info->sender, senderStr, sizeof(noti_info->sender)-strlen(noti_info->sender));
-                                       noti_info->active_noti_button_num = MSG_ACTIVE_NOTI_BUTTON_NUM_CB_MESSAGE;
+                                       if (i == 1)
+                                               noti_info->active_noti_button_num = MSG_ACTIVE_NOTI_BUTTON_NUM_CB_MESSAGE;
                                } else if (subType == MSG_SYNCML_CP) {
                                        senderStr = get_translate_text(MSG_MGR_PACKAGE_NAME, MSG_MGR_LOCALEDIR, CP_MESSAGE);
                                        g_strlcat(noti_info->sender, senderStr, sizeof(noti_info->sender)-strlen(noti_info->sender));
-                                       noti_info->active_noti_button_num = MSG_ACTIVE_NOTI_BUTTON_NUM_PUSH_MESSAGE;
+                                       if (i == 1)
+                                               noti_info->active_noti_button_num = MSG_ACTIVE_NOTI_BUTTON_NUM_PUSH_MESSAGE;
                                } else if (subType == MSG_WAP_SI_SMS || subType == MSG_WAP_SL_SMS) {
                                        senderStr = get_translate_text(MSG_MGR_PACKAGE_NAME, MSG_MGR_LOCALEDIR, PUSH_MESSAGE);
                                        g_strlcat(noti_info->sender, senderStr, sizeof(noti_info->sender)-strlen(noti_info->sender));
-                                       noti_info->active_noti_button_num = MSG_ACTIVE_NOTI_BUTTON_NUM_PUSH_MESSAGE;
+                                       if (i == 1)
+                                               noti_info->active_noti_button_num = MSG_ACTIVE_NOTI_BUTTON_NUM_PUSH_MESSAGE;
                                } else {
                                        g_strlcat(noti_info->sender, tmpAddressInfo.addressVal, sizeof(noti_info->sender)-strlen(noti_info->sender));
-                                       if (subType == MSG_NOTIFICATIONIND_MMS)
+                                       if (subType == MSG_NOTIFICATIONIND_MMS && i == 1)
                                                noti_info->active_noti_button_num = MSG_ACTIVE_NOTI_BUTTON_NUM_UNRETRIVED_MESSAGE;
                                }