diff --git a/androidApp/build.gradle.kts b/androidApp/build.gradle.kts index a92f3972a..53b677298 100644 --- a/androidApp/build.gradle.kts +++ b/androidApp/build.gradle.kts @@ -132,6 +132,7 @@ dependencies { implementation(libs.androidx.profileinstaller) implementation(libs.google.oss.licenses) implementation(libs.androidx.multidex) + implementation(libs.dbflow) testImplementation(projects.core.testing) testImplementation(libs.hilt.android.testing) diff --git a/androidApp/dependencies/releaseRuntimeClasspath.tree.txt b/androidApp/dependencies/releaseRuntimeClasspath.tree.txt index 6a0c7328e..cba5bcc19 100644 --- a/androidApp/dependencies/releaseRuntimeClasspath.tree.txt +++ b/androidApp/dependencies/releaseRuntimeClasspath.tree.txt @@ -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 @@ -1627,4 +1627,5 @@ | +--- 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.github.Raizlabs.DBFlow:dbflow:4.2.4 (*) diff --git a/androidApp/dependencies/releaseRuntimeClasspath.txt b/androidApp/dependencies/releaseRuntimeClasspath.txt index 02741937d..c1d6603bb 100644 --- a/androidApp/dependencies/releaseRuntimeClasspath.txt +++ b/androidApp/dependencies/releaseRuntimeClasspath.txt @@ -160,8 +160,8 @@ 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.android.datatransport:transport-api:3.2.0 diff --git a/androidApp/src/main/kotlin/org/mifos/mobile/HomeActivity.kt b/androidApp/src/main/kotlin/org/mifos/mobile/HomeActivity.kt index 7ced2b270..1de7ca6c6 100644 --- a/androidApp/src/main/kotlin/org/mifos/mobile/HomeActivity.kt +++ b/androidApp/src/main/kotlin/org/mifos/mobile/HomeActivity.kt @@ -47,7 +47,6 @@ class HomeActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { val splashScreen = installSplashScreen() super.onCreate(savedInstanceState) - var uiState: HomeActivityUiState by mutableStateOf(HomeActivityUiState.Loading) // Update the uiState diff --git a/androidApp/src/main/kotlin/org/mifos/mobile/MifosSelfServiceApp.kt b/androidApp/src/main/kotlin/org/mifos/mobile/MifosSelfServiceApp.kt index cf4270510..a728b6070 100644 --- a/androidApp/src/main/kotlin/org/mifos/mobile/MifosSelfServiceApp.kt +++ b/androidApp/src/main/kotlin/org/mifos/mobile/MifosSelfServiceApp.kt @@ -12,6 +12,7 @@ package org.mifos.mobile import androidx.multidex.MultiDex import androidx.multidex.MultiDexApplication import com.google.firebase.crashlytics.FirebaseCrashlytics +import com.raizlabs.android.dbflow.config.FlowManager import dagger.hilt.android.HiltAndroidApp import org.mifos.mobile.core.datastore.PreferencesHelper import org.mifos.mobile.feature.settings.applySavedTheme @@ -21,7 +22,13 @@ class MifosSelfServiceApp : MultiDexApplication() { override fun onCreate() { super.onCreate() MultiDex.install(this) + FlowManager.init(this) FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(true) PreferencesHelper(this).applySavedTheme() } + + override fun onTerminate() { + super.onTerminate() + FlowManager.destroy() + } } diff --git a/core/datastore/src/main/java/org/mifos/mobile/core/datastore/DatabaseHelper.kt b/core/datastore/src/main/java/org/mifos/mobile/core/datastore/DatabaseHelper.kt index 8609eadde..21291efa8 100644 --- a/core/datastore/src/main/java/org/mifos/mobile/core/datastore/DatabaseHelper.kt +++ b/core/datastore/src/main/java/org/mifos/mobile/core/datastore/DatabaseHelper.kt @@ -9,6 +9,8 @@ */ package org.mifos.mobile.core.datastore +import android.util.Log +import com.google.gson.Gson import com.raizlabs.android.dbflow.sql.language.SQLite import io.reactivex.Observable import org.mifos.mobile.core.datastore.model.Charge @@ -48,6 +50,7 @@ class DatabaseHelper @Inject constructor() { .from(MifosNotification::class.java) .queryList() Collections.sort(notifications, NotificationComparator()) + Log.d("Notifications@@@", Gson().toJson(notifications)) return notifications }