[ElmSharp] Fix Transit.Go to start transition immediately (#2014)
authorjaehyun0cho <jaehyun0cho@gmail.com>
Thu, 17 Sep 2020 07:26:13 +0000 (16:26 +0900)
committerGitHub <noreply@github.com>
Thu, 17 Sep 2020 07:26:13 +0000 (16:26 +0900)
Transit.Go calls elm_transit_go_in with interval.
elm_transit_go_in uses timer so it does not start transition immediately
although interval is 0.

To start transition immediately without interval, Transit.Go is fixed to
call elm_transit_go.

Co-authored-by: Jaehyun Cho <jae_hyun.cho@samsung.com>
Co-authored-by: Kangho Hur <rookiejava@gmail.com>
src/ElmSharp/ElmSharp/Transit.cs

index dedadb4..5a66462 100644 (file)
@@ -246,7 +246,16 @@ namespace ElmSharp
         /// <since_tizen> preview </since_tizen>
         public void Go(double interval = 0)
         {
-            Interop.Elementary.elm_transit_go_in(_handle, interval);
+            if (interval == 0)
+            {
+                // To start transition immediately, elm_transit_go() is called.
+                Interop.Elementary.elm_transit_go(_handle);
+            }
+            else
+            {
+                // elm_transit_go_in() uses timer so it does not start transition immediately although interval is 0.
+                Interop.Elementary.elm_transit_go_in(_handle, interval);
+            }
         }
 
         /// <summary>