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

Refactor: Migrate SearchFragment to Jetpack Compose #2073

Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import javax.inject.Singleton
*/
@Singleton
class DataManagerSearch @Inject constructor(private val baseApiManager: BaseApiManager) {
fun searchResources(
suspend fun searchResources(
query: String?, resources: String?,
exactMatch: Boolean?
): Observable<List<SearchedEntity>> {
): List<SearchedEntity> {
return baseApiManager.searchApi.searchResources(query, resources, exactMatch)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import rx.Observable
*/
interface SearchService {
@GET(APIEndPoint.SEARCH)
fun searchResources(
suspend fun searchResources(
@Query("query") clientName: String?,
@Query("resource") resources: String?,
@Query("exactMatch") exactMatch: Boolean?
): Observable<List<SearchedEntity>>
): List<SearchedEntity>
}
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[versions]
accompanistDrawablepainter = "0.35.0-alpha"
accompanistSwiperefresh = "0.25.1"
accompanistPermission = "0.34.0"
adapterRxjava = "2.9.0"
Expand Down Expand Up @@ -118,6 +119,7 @@ truthVersion = '1.1.5'

[libraries]
# AndroidX Libraries
accompanist-drawablepainter = { module = "com.google.accompanist:accompanist-drawablepainter", version.ref = "accompanistDrawablepainter" }
accompanist-swiperefresh = { module = "com.google.accompanist:accompanist-swiperefresh", version.ref = "accompanistSwiperefresh" }
accompanist-permission = { module = "com.google.accompanist:accompanist-permissions", version.ref = "accompanistPermission" }
android-desugarJdkLibs = { group = "com.android.tools", name = "desugar_jdk_libs", version.ref = "androidDesugarJdkLibs" }
Expand Down
3 changes: 3 additions & 0 deletions mifosng-android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ dependencies {
androidTestImplementation(libs.mockito.android)
testImplementation(libs.junit.jupiter)
testImplementation(libs.androidx.core.testing)
testImplementation(libs.kotlinx.coroutines.test)

//Android-Jobs
implementation(libs.android.job)
Expand Down Expand Up @@ -262,4 +263,6 @@ dependencies {
// ViewModel utilities for Compose
implementation(libs.androidx.lifecycle.viewModelCompose)
implementation(libs.androidx.hilt.navigation.compose)

implementation(libs.accompanist.drawablepainter)
}
Loading
Loading