mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
refactor: streamline main screen navigation and ViewModel injection
- Update `MainScreen` (Android) and `DesktopMainScreen` to manage their own `NavBackStack` initialization internally. - Refactor `MainScreen` to obtain `UIViewModel` via Koin injection instead of receiving it as a parameter from `MainActivity`. - Remove default bottom padding from `MeshtasticAppShell` and associated screen-level modifiers to allow for more flexible layout orchestration. - Simplify `DesktopMainScreen` by moving backstack management inside the composable and cleaning up the navigation provider logic. - Remove redundant lint suppressions in `Main.kt` following the simplification of the main screen composable structure. - Clean up imports and normalize the usage of `MeshtasticNavDisplay` and `MeshtasticNavigationSuite` across platforms.
This commit is contained in:
parent
d1ca9e1f2d
commit
26aa8377c5
6 changed files with 39 additions and 49 deletions
|
|
@ -24,6 +24,7 @@ import com.google.accompanist.permissions.ExperimentalPermissionsApi
|
|||
import com.google.accompanist.permissions.PermissionState
|
||||
import com.google.accompanist.permissions.rememberMultiplePermissionsState
|
||||
import com.google.accompanist.permissions.rememberPermissionState
|
||||
import org.meshtastic.core.ui.component.MeshtasticNavDisplay
|
||||
|
||||
/**
|
||||
* Main application introduction screen. This Composable hosts the navigation flow and hoists the permission states.
|
||||
|
|
@ -56,7 +57,7 @@ fun AppIntroductionScreen(onDone: () -> Unit, viewModel: IntroViewModel) {
|
|||
|
||||
val backStack = rememberNavBackStack(Welcome)
|
||||
|
||||
org.meshtastic.core.ui.component.MeshtasticNavDisplay(
|
||||
MeshtasticNavDisplay(
|
||||
backStack = backStack,
|
||||
entryProvider =
|
||||
introNavGraph(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue