[Notification] Fix ActiveStyle binding 66/163066/1
authorSeungha Son <seungha.son@samsung.com>
Thu, 7 Dec 2017 03:19:12 +0000 (12:19 +0900)
committerSeungha Son <seungha.son@samsung.com>
Thu, 7 Dec 2017 05:42:00 +0000 (14:42 +0900)
 If you only set RemoveTime on the ActiveStyle object,
 the ActiveStyle binding fails on NotificationManager.Load()

Signed-off-by: Seungha Son <seungha.son@samsung.com>
Change-Id: Id3f4606711a28f12b9631fd7a795b0dac3a41b9e

src/Tizen.Applications.Notification/Tizen.Applications.Notifications/NotificationStyleBinder.cs

index f84c6f7..e17ae6a 100755 (executable)
@@ -142,7 +142,6 @@ namespace Tizen.Applications.Notifications
             if ((appList & (int)NotificationDisplayApplist.Active) != 0)
             {
                 Notification.ActiveStyle active = new Notification.ActiveStyle();
-                bool isExisted = false;
                 bool autoRemove;
                 string path, text;
                 SafeAppControlHandle appcontrol = null;
@@ -169,7 +168,6 @@ namespace Tizen.Applications.Notifications
                         button.Text = text;
                         button.Index = (ButtonIndex)i;
                         active.AddButtonAction(button);
-                        isExisted = true;
                     }
                 }
 
@@ -216,7 +214,6 @@ namespace Tizen.Applications.Notifications
                 Interop.Notification.GetImage(notification.Handle, NotificationImage.Background, out path);
                 if (string.IsNullOrEmpty(path) == false)
                 {
-                    isExisted = true;
                     active.BackgroundImage = path;
                 }
 
@@ -250,8 +247,6 @@ namespace Tizen.Applications.Notifications
                     Interop.Notification.GetPlaceHolderLength(notification.Handle, out holderLength);
                     reply.ReplyMax = holderLength;
 
-                    isExisted = true;
-
                     try
                     {
                         SafeBundleHandle bundleHandle;
@@ -267,10 +262,7 @@ namespace Tizen.Applications.Notifications
                     active.ReplyAction = reply;
                 }
 
-                if (isExisted)
-                {
-                    notification.AddStyle(active);
-                }
+                notification.AddStyle(active);
             }
         }
     }