Skip to content

Commit

Permalink
fix: notifications rendering issue (#2720)
Browse files Browse the repository at this point in the history
* fix: notifications rendering issue

* init FlowManager in application
  • Loading branch information
Nagarjuna0033 authored Dec 9, 2024
1 parent a15ed12 commit fd8a08d
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 4 deletions.
1 change: 1 addition & 0 deletions androidApp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 3 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,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 (*)
2 changes: 1 addition & 1 deletion androidApp/dependencies/releaseRuntimeClasspath.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit fd8a08d

Please sign in to comment.