Improve home split-view behavior, auto two-column layout, and fragment replace with caching#295
Open
Improve home split-view behavior, auto two-column layout, and fragment replace with caching#295
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
addtransactions withreplacewhile preserving UI state to avoid reloading Lua views on navigation.Description
updateHomeRecommendColumnsand anOnLayoutChangeListenerinlayout/home.luato compute and set theGridLayoutManagerspan count from the actual laid-out width and post an initial update.home.luaupdateSekaisof1(home) andf2(secondary) get explicit widths in split mode.selectTargetContainerand helper functions inmods/muk.lua, enablet.setReorderingAllowed(true), and change fragment transactions fromt.add(...)tot.replace(...)so new fragments are placed into the chosen container.MyFragmentViewmodeland updateMyLuaFileFragmentto store/restore the Lua fragment content view across view destruction/creation by settingmVM.cachedContentViewandmVM.luaFileLoaded, and avoid re-running Lua file when cached view is reused.Testing
git diff --checkto ensure no trailing-whitespace issues (passed)../gradlew :app:compileDebugJavaWithJavacbut the build failed in this environment withUnsupported class file major version 69, which is a tooling/JDK mismatch and not related to the code changes.Codex Task