Fixed Flicking issue at launch time when notification exist. 84/317884/1
authorMd. Farhan Mahtab/NC eXperience Group /SRBD/Engineer/Samsung Electronics <farhan.m1@samsung.com>
Fri, 20 Sep 2024 04:22:07 +0000 (10:22 +0600)
committerMd. Farhan Mahtab/NC eXperience Group /SRBD/Engineer/Samsung Electronics <farhan.m1@samsung.com>
Fri, 20 Sep 2024 04:22:07 +0000 (10:22 +0600)
[Problem][TNINE-4267] When there is a notification in the list, windows makes a flicking at the launch time

[Cause & Measure]
 Cause   : Window is resized twice by display server after launch.
 Measure : Added a delay of 500ms for adding NUIApplication.Window.Resized event handler to avoid the two unwanted resize after launch.

Change-Id: Ic59014ee078b02448d6c1e810c9575e638366386
Signed-off-by: Md. Farhan Mahtab/NC eXperience Group /SRBD/Engineer/Samsung Electronics <farhan.m1@samsung.com>
Notifications/ViewManager.cs

index e370b0302a7c8358a8caec299e2e84310da5f891..40724940c6f8fea4da73a78563287154f976dbdf 100644 (file)
@@ -15,6 +15,7 @@
  */
 
 using System;
+using System.Timers;
 using Tizen.Applications.NotificationEventListener;
 using Tizen.NUI;
 using Notifications.Common;
@@ -28,6 +29,7 @@ namespace Notifications
         private NotificationsViewModel notificationsViewModel;
         private NotificationsDetailViewModel notificationsDetailViewModel;
         private BaseView baseView;
+        private System.Timers.Timer timer;
         public ViewManager()
         {
             notificationsViewModel = new NotificationsViewModel();
@@ -38,7 +40,14 @@ namespace Notifications
             baseView.BackKeyPressed += OnBackKeyPressed;
 
             Window.Instance.Add(baseView);
-            Window.Instance.Resized += OnWindowResized;
+
+            timer = new System.Timers.Timer(500);
+            timer.Elapsed += (s, e) =>
+            {
+                Window.Instance.Resized += OnWindowResized;
+                timer.Stop();
+            };
+            timer.Start();
 
             ThemeManager.ThemeChanged += OnThemeChanged;
         }