From 99cb20b80a95bd8b0aaa5557b73f055c377cdee4 Mon Sep 17 00:00:00 2001 From: rcy-hw Date: Fri, 29 Apr 2022 14:07:04 +0800 Subject: [PATCH] fix extend content show error Signed-off-by: rcy-hw Change-Id: I1fb997e79446430e696e9de5dcbdf1103f4f3987 --- frameworks/ans/native/src/reminder_request.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frameworks/ans/native/src/reminder_request.cpp b/frameworks/ans/native/src/reminder_request.cpp index 17390bd8c..8ea492c9f 100644 --- a/frameworks/ans/native/src/reminder_request.cpp +++ b/frameworks/ans/native/src/reminder_request.cpp @@ -1453,12 +1453,12 @@ void ReminderRequest::UpdateNotificationContent(const bool &setSnooze) if (timeIntervalInMilli_ != 0) { // snooze the reminder by manual extendContent = GetShowTime(triggerTimeInMilli_) + - snoozeContent_ == "" ? "" : (" (" + snoozeContent_ + ")"); + (snoozeContent_ == "" ? "" : (" (" + snoozeContent_ + ")")); notificationRequest_->SetTapDismissed(false); } else { // the reminder is expired now, when timeInterval is 0 extendContent = GetShowTime(reminderTimeInMilli_) + - expiredContent_ == "" ? "" : (" (" + expiredContent_ + ")"); + (expiredContent_ == "" ? "" : (" (" + expiredContent_ + ")")); } } else if (IsAlerting()) { // the reminder is alerting, or ring duration is 0 @@ -1466,12 +1466,12 @@ void ReminderRequest::UpdateNotificationContent(const bool &setSnooze) } else if (snoozeTimesDynamic_ != snoozeTimes_) { // the reminder is snoozing by period artithmetic, when the ring duration is over. extendContent = GetShowTime(triggerTimeInMilli_) + - snoozeContent_ == "" ? "" : (" (" + snoozeContent_ + ")"); + (snoozeContent_ == "" ? "" : (" (" + snoozeContent_ + ")")); notificationRequest_->SetTapDismissed(false); } else { // the reminder has already snoozed by period arithmetic, when the ring duration is over. extendContent = GetShowTime(reminderTimeInMilli_) + - expiredContent_ == "" ? "" : (" (" + expiredContent_ + ")"); + (expiredContent_ == "" ? "" : (" (" + expiredContent_ + ")")); } displayContent_ = content_ + " " + extendContent; ANSR_LOGD("Display content=%{public}s", displayContent_.c_str()); -- Gitee