Skip to content

Commit fd8a08d

Browse files
fix: notifications rendering issue (#2720)
* fix: notifications rendering issue * init FlowManager in application
1 parent a15ed12 commit fd8a08d

File tree

6 files changed

+15
-4
lines changed

6 files changed

+15
-4
lines changed

androidApp/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ dependencies {
132132
implementation(libs.androidx.profileinstaller)
133133
implementation(libs.google.oss.licenses)
134134
implementation(libs.androidx.multidex)
135+
implementation(libs.dbflow)
135136

136137
testImplementation(projects.core.testing)
137138
testImplementation(libs.hilt.android.testing)

androidApp/dependencies/releaseRuntimeClasspath.tree.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,7 +1096,7 @@
10961096
| | | +--- com.google.dagger:hilt-android:2.52 (*)
10971097
| | | +--- com.squareup.retrofit2:converter-gson:2.11.0 (*)
10981098
| | | +--- com.github.Raizlabs.DBFlow:dbflow:4.2.4
1099-
| | | | \--- com.github.Raizlabs.DBFlow:dbflow-core:4.2.4
1099+
| | | | +--- com.github.Raizlabs.DBFlow:dbflow-core:4.2.4
11001100
| | | | \--- com.android.support:support-annotations:26.0.1 -> androidx.annotation:annotation:1.8.1 (*)
11011101
| | | +--- com.github.Raizlabs.DBFlow:dbflow-core:4.2.4
11021102
| | | +--- io.reactivex.rxjava2:rxandroid:2.1.1
@@ -1627,4 +1627,5 @@
16271627
| +--- com.google.android.gms:play-services-base:18.5.0 (*)
16281628
| +--- com.google.android.gms:play-services-basement:18.4.0 (*)
16291629
| \--- com.google.android.gms:play-services-tasks:18.2.0 (*)
1630-
\--- androidx.multidex:multidex:2.0.1
1630+
+--- androidx.multidex:multidex:2.0.1
1631+
\--- com.github.Raizlabs.DBFlow:dbflow:4.2.4 (*)

androidApp/dependencies/releaseRuntimeClasspath.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ co.touchlab:stately-concurrent-collections-jvm:2.0.6
160160
co.touchlab:stately-concurrent-collections:2.0.6
161161
co.touchlab:stately-strict-jvm:2.0.6
162162
co.touchlab:stately-strict:2.0.6
163-
com.github.Raizlabs.DBFlow:dbflow:4.2.4
164163
com.github.Raizlabs.DBFlow:dbflow-core:4.2.4
164+
com.github.Raizlabs.DBFlow:dbflow:4.2.4
165165
com.google.accompanist:accompanist-pager:0.34.0
166166
com.google.accompanist:accompanist-permissions:0.34.0
167167
com.google.android.datatransport:transport-api:3.2.0

androidApp/src/main/kotlin/org/mifos/mobile/HomeActivity.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ class HomeActivity : ComponentActivity() {
4747
override fun onCreate(savedInstanceState: Bundle?) {
4848
val splashScreen = installSplashScreen()
4949
super.onCreate(savedInstanceState)
50-
5150
var uiState: HomeActivityUiState by mutableStateOf(HomeActivityUiState.Loading)
5251

5352
// Update the uiState

androidApp/src/main/kotlin/org/mifos/mobile/MifosSelfServiceApp.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ package org.mifos.mobile
1212
import androidx.multidex.MultiDex
1313
import androidx.multidex.MultiDexApplication
1414
import com.google.firebase.crashlytics.FirebaseCrashlytics
15+
import com.raizlabs.android.dbflow.config.FlowManager
1516
import dagger.hilt.android.HiltAndroidApp
1617
import org.mifos.mobile.core.datastore.PreferencesHelper
1718
import org.mifos.mobile.feature.settings.applySavedTheme
@@ -21,7 +22,13 @@ class MifosSelfServiceApp : MultiDexApplication() {
2122
override fun onCreate() {
2223
super.onCreate()
2324
MultiDex.install(this)
25+
FlowManager.init(this)
2426
FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(true)
2527
PreferencesHelper(this).applySavedTheme()
2628
}
29+
30+
override fun onTerminate() {
31+
super.onTerminate()
32+
FlowManager.destroy()
33+
}
2734
}

core/datastore/src/main/java/org/mifos/mobile/core/datastore/DatabaseHelper.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
*/
1010
package org.mifos.mobile.core.datastore
1111

12+
import android.util.Log
13+
import com.google.gson.Gson
1214
import com.raizlabs.android.dbflow.sql.language.SQLite
1315
import io.reactivex.Observable
1416
import org.mifos.mobile.core.datastore.model.Charge
@@ -48,6 +50,7 @@ class DatabaseHelper @Inject constructor() {
4850
.from(MifosNotification::class.java)
4951
.queryList()
5052
Collections.sort(notifications, NotificationComparator())
53+
Log.d("Notifications@@@", Gson().toJson(notifications))
5154
return notifications
5255
}
5356

0 commit comments

Comments
 (0)