diff --git a/core/common/src/main/java/com/mifos/core/common/utils/FileUtils.kt b/core/common/src/main/java/com/mifos/core/common/utils/FileUtils.kt index 89fbbbd820..39188be237 100644 --- a/core/common/src/main/java/com/mifos/core/common/utils/FileUtils.kt +++ b/core/common/src/main/java/com/mifos/core/common/utils/FileUtils.kt @@ -67,12 +67,12 @@ object FileUtils { when { isExternalStorageDocument(uri) -> { val docId = DocumentsContract.getDocumentId(uri) - val split = docId.split(":") + val split = docId.split(":".toRegex()).dropLastWhile { it.isEmpty() }.toTypedArray() val type = split[0] if ("primary".equals(type, ignoreCase = true)) { resultPath = "${Environment.getExternalStorageDirectory()}/${split[1]}" } - // Handle non-primary volumes if necessary + // TODO() Handle non-primary volumes } isDownloadsDocument(uri) -> { val id = DocumentsContract.getDocumentId(uri) diff --git a/feature/passcode/src/test/java/com/mifos/feature/passcode/ExampleUnitTest.kt b/feature/passcode/src/test/java/com/mifos/feature/passcode/ExampleUnitTest.kt index 9a506a4c16..11a80beddb 100644 --- a/feature/passcode/src/test/java/com/mifos/feature/passcode/ExampleUnitTest.kt +++ b/feature/passcode/src/test/java/com/mifos/feature/passcode/ExampleUnitTest.kt @@ -1,9 +1,8 @@ package com.mifos.feature.passcode +import org.junit.Assert.assertEquals import org.junit.Test -import org.junit.Assert.* - /** * Example local unit test, which will execute on the development machine (host). * diff --git a/feature/path-tracking/src/main/java/com/mifos/feature/pathTracking/PathTrackingScreen.kt b/feature/path-tracking/src/main/java/com/mifos/feature/pathTracking/PathTrackingScreen.kt index e5fbde1320..928add5654 100644 --- a/feature/path-tracking/src/main/java/com/mifos/feature/pathTracking/PathTrackingScreen.kt +++ b/feature/path-tracking/src/main/java/com/mifos/feature/pathTracking/PathTrackingScreen.kt @@ -260,7 +260,7 @@ private fun PathTrackingItem( modifier: Modifier = Modifier, onPathTrackingClick: (List) -> Unit, ) { - val latLngList = getLatLngList(pathTracking.latlng) + val latLngList = getLatLngList(pathTracking.latLng) val latLng = latLngList[0] val cameraPositionState = rememberCameraPositionState { position = CameraPosition.fromLatLngZoom(LatLng(latLng.lat, latLng.lng), 15f) @@ -286,7 +286,7 @@ private fun PathTrackingItem( ) Text( modifier = Modifier.padding(8.dp), - text = "${pathTracking.date} from ${pathTracking.start_time} to ${pathTracking.stop_time}", + text = "${pathTracking.date} from ${pathTracking.startTime} to ${pathTracking.stopTime}", style = TextStyle( fontSize = 16.sp, fontWeight = FontWeight.Normal, @@ -335,10 +335,10 @@ private fun PathTrackingScreenPreview( val samplePathTrackingList = List(10) { UserLocation( - user_id = it, - latlng = "123,456", + userId = it, + latLng = "123,456", date = "date $it", - start_time = "start time $it", - stop_time = "stop time $it", + startTime = "start time $it", + stopTime = "stop time $it", ) } diff --git a/feature/report/src/main/java/com/mifos/feature/report/reportDetail/ReportDetailScreen.kt b/feature/report/src/main/java/com/mifos/feature/report/reportDetail/ReportDetailScreen.kt index 4ff62bc700..e8bf798c85 100644 --- a/feature/report/src/main/java/com/mifos/feature/report/reportDetail/ReportDetailScreen.kt +++ b/feature/report/src/main/java/com/mifos/feature/report/reportDetail/ReportDetailScreen.kt @@ -153,7 +153,7 @@ internal fun ReportDetailScreen( } LaunchedEffect(Unit) { - val reportName = "'" + reportItem.report_name + "'" + val reportName = "'" + reportItem.reportName + "'" viewModel.fetchFullParameterList(reportName, true) } @@ -180,7 +180,7 @@ internal fun ReportDetailScreen( reportProducts = reportProducts, runReport = { mapQuery -> runReportEnable = true - reportItem.report_name?.let { + reportItem.reportName?.let { viewModel.fetchRunReportWithQuery(it, mapQuery) } }, @@ -380,7 +380,7 @@ private fun RunReportContent( .weight(1f) .padding(start = 16.dp), ) { - reportItem.report_name?.let { + reportItem.reportName?.let { Text( text = it, style = TextStyle( @@ -398,7 +398,7 @@ private fun RunReportContent( horizontalArrangement = Arrangement.SpaceBetween, ) { Text( - text = reportItem.report_type.toString(), + text = reportItem.reportType.toString(), style = TextStyle( fontSize = 14.sp, fontWeight = FontWeight.Normal, @@ -407,7 +407,7 @@ private fun RunReportContent( ), ) Text( - text = reportItem.report_category.toString(), + text = reportItem.reportCategory.toString(), style = TextStyle( fontSize = 14.sp, fontWeight = FontWeight.Normal, diff --git a/feature/report/src/main/java/com/mifos/feature/report/runReport/RunReportScreen.kt b/feature/report/src/main/java/com/mifos/feature/report/runReport/RunReportScreen.kt index 4be9fa7c63..cf3f09eb74 100644 --- a/feature/report/src/main/java/com/mifos/feature/report/runReport/RunReportScreen.kt +++ b/feature/report/src/main/java/com/mifos/feature/report/runReport/RunReportScreen.kt @@ -276,7 +276,7 @@ private fun RunReportCardItem( .weight(1f) .padding(start = 16.dp), ) { - report.report_name?.let { + report.reportName?.let { Text( text = it, style = TextStyle( @@ -294,7 +294,7 @@ private fun RunReportCardItem( horizontalArrangement = Arrangement.SpaceBetween, ) { Text( - text = report.report_type.toString(), + text = report.reportType.toString(), style = TextStyle( fontSize = 14.sp, fontWeight = FontWeight.Normal, @@ -303,7 +303,7 @@ private fun RunReportCardItem( ), ) Text( - text = report.report_category.toString(), + text = report.reportCategory.toString(), style = TextStyle( fontSize = 14.sp, fontWeight = FontWeight.Normal, @@ -353,8 +353,8 @@ private fun RunReportPreview( val sampleRunReports = List(10) { ClientReportTypeItem( - report_name = "Report $it", - report_type = "Type $it", - report_category = "Category $it", + reportName = "Report $it", + reportType = "Type $it", + reportCategory = "Category $it", ) } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 8ba408e21c..de98560eae 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -7,7 +7,7 @@ androidDesugarJdkLibs = "2.0.4" androidIconifyMaterial = "2.2.2" androidJob = "1.2.6" androidMapsUtils = "0.4.2" -androidGradlePlugin = "8.5.0" +androidGradlePlugin = "8.7.3" androidTools = "31.6.0" androidxActivity = "1.8.2" androidxAppCompat = "1.6.1"