remove app animations to fix transition flash
Temporarily removed complex animations that were causing double-render flash. Using simple hide/show approach during content loading instead.
This commit is contained in:
@@ -60,11 +60,8 @@ function loadAppContent_internal(app_id, app_path, skip_animation)
|
|||||||
|
|
||||||
-- Load app content using C++ function
|
-- Load app content using C++ function
|
||||||
if loadAppContent then
|
if loadAppContent then
|
||||||
-- Set opening animation BEFORE loading content to prevent flash
|
-- Hide container before loading to prevent flash
|
||||||
if not skip_animation then
|
app_container:SetClass("app-hidden", true)
|
||||||
app_container:SetClass("app-opening", true)
|
|
||||||
app_container:SetClass("app-closing", false)
|
|
||||||
end
|
|
||||||
|
|
||||||
local success = loadAppContent(app_container, app_path)
|
local success = loadAppContent(app_container, app_path)
|
||||||
showLoading(false)
|
showLoading(false)
|
||||||
@@ -74,12 +71,8 @@ function loadAppContent_internal(app_id, app_path, skip_animation)
|
|||||||
current_app_path = app_path
|
current_app_path = app_path
|
||||||
print("[Shell] App loaded: " .. app_id)
|
print("[Shell] App loaded: " .. app_id)
|
||||||
|
|
||||||
-- Remove animation class after it completes
|
-- Show container after content is loaded
|
||||||
if not skip_animation and setTimeout then
|
app_container:SetClass("app-hidden", false)
|
||||||
setTimeout(function()
|
|
||||||
app_container:SetClass("app-opening", false)
|
|
||||||
end, 300)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- If home was loaded, populate apps dynamically
|
-- If home was loaded, populate apps dynamically
|
||||||
if app_id == "home" then
|
if app_id == "home" then
|
||||||
@@ -139,20 +132,10 @@ end
|
|||||||
|
|
||||||
-- ===== NAVIGATION =====
|
-- ===== NAVIGATION =====
|
||||||
|
|
||||||
-- Play closing animation then execute callback
|
-- Execute callback for navigation (animations removed to fix flash)
|
||||||
local function playCloseAnimation(callback)
|
local function playCloseAnimation(callback)
|
||||||
if app_container and setTimeout then
|
-- Just execute callback immediately - loadAppContent handles hiding
|
||||||
app_container:SetClass("app-closing", true)
|
if callback then callback() end
|
||||||
app_container:SetClass("app-opening", false)
|
|
||||||
setTimeout(function()
|
|
||||||
-- Don't remove app-closing yet - callback will load new content
|
|
||||||
-- and loadAppContent_internal will switch to app-opening
|
|
||||||
if callback then callback() end
|
|
||||||
end, 200)
|
|
||||||
else
|
|
||||||
-- No animation support, execute immediately
|
|
||||||
if callback then callback() end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Go back to previous app
|
-- Go back to previous app
|
||||||
|
|||||||
@@ -51,38 +51,9 @@
|
|||||||
background-color: #121212;
|
background-color: #121212;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* App launch/close animations */
|
/* App visibility - simple hide/show without complex animations */
|
||||||
.app-opening {
|
.app-hidden {
|
||||||
animation: 0.25s back-out app-open;
|
|
||||||
}
|
|
||||||
|
|
||||||
.app-closing {
|
|
||||||
animation: 0.2s quadratic-in app-close;
|
|
||||||
/* Keep at end state after animation */
|
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transform: scale(0.8);
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes app-open {
|
|
||||||
from {
|
|
||||||
opacity: 0;
|
|
||||||
transform: scale(0.8);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
opacity: 1;
|
|
||||||
transform: scale(1.0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes app-close {
|
|
||||||
from {
|
|
||||||
opacity: 1;
|
|
||||||
transform: scale(1.0);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
opacity: 0;
|
|
||||||
transform: scale(0.8);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* System navigation bar at bottom - always visible */
|
/* System navigation bar at bottom - always visible */
|
||||||
|
|||||||
Reference in New Issue
Block a user