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
|
||||
if loadAppContent then
|
||||
-- Set opening animation BEFORE loading content to prevent flash
|
||||
if not skip_animation then
|
||||
app_container:SetClass("app-opening", true)
|
||||
app_container:SetClass("app-closing", false)
|
||||
end
|
||||
-- Hide container before loading to prevent flash
|
||||
app_container:SetClass("app-hidden", true)
|
||||
|
||||
local success = loadAppContent(app_container, app_path)
|
||||
showLoading(false)
|
||||
@@ -74,12 +71,8 @@ function loadAppContent_internal(app_id, app_path, skip_animation)
|
||||
current_app_path = app_path
|
||||
print("[Shell] App loaded: " .. app_id)
|
||||
|
||||
-- Remove animation class after it completes
|
||||
if not skip_animation and setTimeout then
|
||||
setTimeout(function()
|
||||
app_container:SetClass("app-opening", false)
|
||||
end, 300)
|
||||
end
|
||||
-- Show container after content is loaded
|
||||
app_container:SetClass("app-hidden", false)
|
||||
|
||||
-- If home was loaded, populate apps dynamically
|
||||
if app_id == "home" then
|
||||
@@ -139,20 +132,10 @@ end
|
||||
|
||||
-- ===== NAVIGATION =====
|
||||
|
||||
-- Play closing animation then execute callback
|
||||
-- Execute callback for navigation (animations removed to fix flash)
|
||||
local function playCloseAnimation(callback)
|
||||
if app_container and setTimeout then
|
||||
app_container:SetClass("app-closing", true)
|
||||
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
|
||||
-- Just execute callback immediately - loadAppContent handles hiding
|
||||
if callback then callback() end
|
||||
end
|
||||
|
||||
-- Go back to previous app
|
||||
|
||||
@@ -51,38 +51,9 @@
|
||||
background-color: #121212;
|
||||
}
|
||||
|
||||
/* App launch/close animations */
|
||||
.app-opening {
|
||||
animation: 0.25s back-out app-open;
|
||||
}
|
||||
|
||||
.app-closing {
|
||||
animation: 0.2s quadratic-in app-close;
|
||||
/* Keep at end state after animation */
|
||||
/* App visibility - simple hide/show without complex animations */
|
||||
.app-hidden {
|
||||
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 */
|
||||
|
||||
Reference in New Issue
Block a user