Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed #2713 #2714

Open
wants to merge 4 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions androidApp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,9 @@ dependencies {
androidTestImplementation(libs.hilt.android.testing)

debugApi(libs.androidx.compose.ui.tooling)

implementation("com.google.accompanist:accompanist-systemuicontroller:0.34.0")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Accompanist system UI controller has been deprecated, we should migrate to EdgeToEdge Api




}
9 changes: 7 additions & 2 deletions androidApp/dependencies/releaseRuntimeClasspath.tree.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1096,7 +1096,7 @@
| | | +--- com.google.dagger:hilt-android:2.52 (*)
| | | +--- com.squareup.retrofit2:converter-gson:2.11.0 (*)
| | | +--- com.github.Raizlabs.DBFlow:dbflow:4.2.4
| | | | \--- com.github.Raizlabs.DBFlow:dbflow-core:4.2.4
| | | | +--- com.github.Raizlabs.DBFlow:dbflow-core:4.2.4
| | | | \--- com.android.support:support-annotations:26.0.1 -> androidx.annotation:annotation:1.8.1 (*)
| | | +--- com.github.Raizlabs.DBFlow:dbflow-core:4.2.4
| | | +--- io.reactivex.rxjava2:rxandroid:2.1.1
Expand Down Expand Up @@ -1627,4 +1627,9 @@
| +--- com.google.android.gms:play-services-base:18.5.0 (*)
| +--- com.google.android.gms:play-services-basement:18.4.0 (*)
| \--- com.google.android.gms:play-services-tasks:18.2.0 (*)
\--- androidx.multidex:multidex:2.0.1
+--- androidx.multidex:multidex:2.0.1
\--- com.google.accompanist:accompanist-systemuicontroller:0.34.0
+--- androidx.core:core-ktx:1.8.0 -> 1.13.1 (*)
+--- androidx.compose.ui:ui:1.6.0 -> 1.7.0-rc01 (*)
+--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4 -> 1.8.0 (*)
\--- org.jetbrains.kotlin:kotlin-stdlib:1.9.22 -> 2.0.20 (*)
3 changes: 2 additions & 1 deletion androidApp/dependencies/releaseRuntimeClasspath.txt
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,11 @@ co.touchlab:stately-concurrent-collections-jvm:2.0.6
co.touchlab:stately-concurrent-collections:2.0.6
co.touchlab:stately-strict-jvm:2.0.6
co.touchlab:stately-strict:2.0.6
com.github.Raizlabs.DBFlow:dbflow:4.2.4
com.github.Raizlabs.DBFlow:dbflow-core:4.2.4
com.github.Raizlabs.DBFlow:dbflow:4.2.4
com.google.accompanist:accompanist-pager:0.34.0
com.google.accompanist:accompanist-permissions:0.34.0
com.google.accompanist:accompanist-systemuicontroller:0.34.0
com.google.android.datatransport:transport-api:3.2.0
com.google.android.datatransport:transport-backend-cct:3.3.0
com.google.android.datatransport:transport-runtime:3.3.0
Expand Down
2 changes: 2 additions & 0 deletions androidApp/src/main/kotlin/org/mifos/mobile/HomeActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ class HomeActivity : ComponentActivity() {
when (uiState) {
HomeActivityUiState.Loading -> true
is Success -> false
HomeActivityUiState.Loading -> TODO()
is Success -> TODO()
}
}

Expand Down
16 changes: 12 additions & 4 deletions androidApp/src/main/kotlin/org/mifos/mobile/ui/MifosApp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.semantics.testTagsAsResourceId
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.google.accompanist.systemuicontroller.rememberSystemUiController
import org.mifos.mobile.R
import org.mifos.mobile.core.designsystem.theme.MifosBackground
import org.mifos.mobile.navigation.MifosNavHost
Expand All @@ -45,11 +45,20 @@ fun MifosApp(
onClickLogout: () -> Unit,
modifier: Modifier = Modifier,
) {
val systemUiController = rememberSystemUiController()
val isOffline by appState.isOffline.collectAsStateWithLifecycle()

// Set the status bar color based on your theme
val statusBarColor = MaterialTheme.colorScheme.primary // Use the defined primary color

// Apply the status bar color
LaunchedEffect(Unit) {
systemUiController.setStatusBarColor(color = statusBarColor)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Migrate to EdgeToEdge Api

}

MifosBackground(modifier) {
val snackbarHostState = remember { SnackbarHostState() }

val isOffline by appState.isOffline.collectAsStateWithLifecycle()

// If user is not connected to the internet show a snack bar to inform them.
val notConnectedMessage = stringResource(R.string.not_connected)
LaunchedEffect(isOffline) {
Expand All @@ -63,7 +72,6 @@ fun MifosApp(

Scaffold(
modifier = Modifier.semantics {
testTagsAsResourceId = true
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep as it is, useful for testing

},
containerColor = Color.Transparent,
contentColor = MaterialTheme.colorScheme.onBackground,
Expand Down
1 change: 1 addition & 0 deletions androidApp/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
<color name="background_default_darker">#EEEEEE</color>
<color name="transparent">#00000000</color>


<!--Swipe Refresh Colors-->
<array name="swipeRefreshColors">
<item>@color/blue_light</item>
Expand Down