[Notification] Save the hidetime, deletetime value (#140) 4.0.1.14106
authormk5004lee <37102375+mk5004lee@users.noreply.github.com>
Tue, 6 Mar 2018 09:50:41 +0000 (09:50 +0000)
committersemun-lee <35090067+semun-lee@users.noreply.github.com>
Tue, 6 Mar 2018 09:50:41 +0000 (18:50 +0900)
- regardless of IsAutoRemove

Signed-off-by: mk5004.lee <mk5004.lee@samsung.com>
src/Tizen.Applications.Notification/Tizen.Applications.Notifications/NotificationStyleBinder.cs

index 5824a18..8b837bc 100755 (executable)
@@ -72,17 +72,22 @@ namespace Tizen.Applications.Notifications
         internal static void BindObject(Notification notification)
         {
             int flag;
+            int hidetime = 0;
+            int deletetime = 0;
             NotificationError ret = NotificationError.None;
             Notification.ActiveStyle style = (Notification.ActiveStyle)notification.GetStyle("Active");
 
             Interop.Notification.SetAutoRemove(notification.Handle, style.IsAutoRemove);
-            if (style.IsAutoRemove == true)
-            {
-                int hidetime;
-                int deletetime;
-                style.GetRemoveTime(out hidetime, out deletetime);
 
+            style.GetRemoveTime(out hidetime, out deletetime);
+
+            if (hidetime > 0)
+            {
                 Interop.Notification.SetHideTime(notification.Handle, hidetime);
+            }
+
+            if (deletetime > 0)
+            {
                 try
                 {
                     Interop.Notification.SetDeleteTime(notification.Handle, deletetime);