解决进入切换语言界面右划退出错误问题
authorluozheng <1732036298@qq.com>
Mon, 8 Apr 2024 03:29:24 +0000 (11:29 +0800)
committerluozheng <1732036298@qq.com>
Mon, 8 Apr 2024 03:29:24 +0000 (11:29 +0800)
code/sdk/application/wearable/fd230app/nativeui/language/src/LanguageSwitchPresenter.cpp

index 6a10bd5..5e4e4f0 100644 (file)
@@ -2,7 +2,7 @@
  * @Author: luozheng 1732036298@qq.com
  * @Date: 2024-03-28 14:17:43
  * @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-04-02 17:17:55
+ * @LastEditTime: 2024-04-08 11:21:43
  * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/language/src/LanguageSwitchPresenter.cpp
  */
 #include "AppViewIDs.h"
@@ -81,7 +81,8 @@ namespace OHOS
         UNUSED(view);
         if (event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT)
         {
-            NativeAbility::GetInstance().ChangeSlice(VIEW_APPLIST);
+            uint16_t preSlice = NativeAbility::GetInstance().GetPreSliceId();
+            NativeAbility::GetInstance().ChangeSlice(preSlice);
         }
         return true;
     }