Conversation
Because HorizontalPager pre-renders all tab composables, LaunchedEffect with a Unit key was only executing once on initial creation. As a result, changes to configuration (e.g. update channel) calling resetUpdate() did not trigger a reload when returning to the Home tab, causing the install/reinstall dialog to display an empty changelog. Trigger startLoading() whenever a tab becomes active (isCurrentPage). Assisted-by: Gemini 3.7 Flash
Refactor apk-ng UI components and screens to follow idiomatic Jetpack Compose patterns: - Hoist state across dialogs and bottom sheets, replacing MutableState parameter passing with standard boolean flags and event callbacks. - Add modifier parameter to all UI composables and apply proper modifier chaining. - Decouple screen composables from MainActivity host casting by providing explicit authentication and permission callbacks. - Scope SuperuserViewModel to MainActivity and share across MainScreen and SuperuserDetailScreen. - Unify loose mutable states in SuRequestViewModel into an immutable UiState StateFlow. - Fix dynamic loop remember allocations in MainActivity dialogs. - Provide stable item keys for LazyColumn in MagiskLogTab. Assisted-by: Gemini 3.7 Flash
Refactor apk-ng to adhere to modern Android and Jetpack Compose best practices: - Migrate VMFactory to the type-safe AndroidX viewModelFactory DSL. - Use collectAsStateWithLifecycle across all screen composables to pause flow collection when backgrounded. - Convert PolicyItem, ModuleItem, DenyAppState, and DenyProcessState to pure immutable data classes, removing Compose MutableState from ViewModels. - Extract shell operations from UI model classes into ViewModels. - Bridge Info.isConnected LiveData to coroutine Flow using callbackFlow and collect in viewModelScope without modifying :core. - Consolidate magisk and manager version state into HomeViewModel.UiState. - Add contentType to LazyColumn items for optimal list recycling. - Restore proper localized string resolution in MainActivityDialogs. Assisted-by: Gemini 3.7 Flash
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.
No description provided.