From 0951b6ccf5416990bd2a5f5363bab87fc4fbf014 Mon Sep 17 00:00:00 2001 From: Jusung Son Date: Wed, 27 May 2020 11:30:11 +0900 Subject: [PATCH] Support pure noti-ex deletion Change-Id: Ib7819401690f895c13494b781ce15c8c379930ff Signed-off-by: Jusung Son --- src/notification_ex_service.cc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/notification_ex_service.cc b/src/notification_ex_service.cc index e9acbc1..509a510 100644 --- a/src/notification_ex_service.cc +++ b/src/notification_ex_service.cc @@ -578,10 +578,20 @@ class DPMManager : public Manager { DBManager::GetNotificationList(info.GetOwner(), facade_->GetUid(info), info.GetChannel()); EventInfo event_info(EventInfo::Delete, info.GetOwner(), info.GetChannel()); + DoDelete(event_info, noti_list); facade_->LaunchDefaultViewer(noti_list, NOTIFICATION_OP_DELETE); } else { - int ret = DoDelete(info, deletedList); + int64_t priv_id = static_pointer_cast + (deletedList.front()->GetInfo())->GetPrivateId(); + list> noti_list; + if (priv_id == 0) { + noti_list = DBManager::GetNotificationList(info.GetOwner(), + deletedList.front()->GetId(), facade_->GetUid(info)); + } else { + noti_list = deletedList; + } + int ret = DoDelete(info, noti_list); if (ret == ERROR_NONE) facade_->LaunchDefaultViewer(deletedList, NOTIFICATION_OP_DELETE); } -- 2.7.4