diff --git a/app/build.gradle b/app/build.gradle index d726595c..90041973 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -186,7 +186,6 @@ dependencies { def lifecycle_version = '2.8.7' implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle_version" - implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version" implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version" implementation "androidx.lifecycle:lifecycle-viewmodel-compose:$lifecycle_version" implementation "androidx.lifecycle:lifecycle-runtime-compose:$lifecycle_version" @@ -202,7 +201,6 @@ dependencies { implementation 'androidx.compose.ui:ui-tooling-preview' implementation 'androidx.compose.material3:material3' - implementation "androidx.compose.runtime:runtime-livedata" testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.2.1' diff --git a/app/src/main/java/xyz/malkki/neostumbler/db/dao/StatisticsDao.kt b/app/src/main/java/xyz/malkki/neostumbler/db/dao/StatisticsDao.kt index d94c5e1a..f37d3261 100644 --- a/app/src/main/java/xyz/malkki/neostumbler/db/dao/StatisticsDao.kt +++ b/app/src/main/java/xyz/malkki/neostumbler/db/dao/StatisticsDao.kt @@ -1,6 +1,5 @@ package xyz.malkki.neostumbler.db.dao -import androidx.lifecycle.LiveData import androidx.room.Dao import androidx.room.MapColumn import androidx.room.Query @@ -29,25 +28,4 @@ interface StatisticsDao { """ ) fun newCellsPerDay(): Flow> - - @Query( - """ - SELECT COUNT(DISTINCT macAddress) FROM WifiAccessPointEntity - """ - ) - fun distinctWifisCount(): LiveData - - @Query( - """ - SELECT COUNT(DISTINCT macAddress) FROM BluetoothBeaconEntity - """ - ) - fun distinctBeaconsCount(): LiveData - - @Query( - """ - SELECT COUNT(*) FROM (SELECT DISTINCT radioType, mobileCountryCode, mobileNetworkCode, locationAreaCode, cellId, primaryScramblingCode FROM CellTowerEntity) - """ - ) - fun distinctCellsCount(): LiveData } \ No newline at end of file diff --git a/app/src/main/java/xyz/malkki/neostumbler/ui/composables/ReportUploadButton.kt b/app/src/main/java/xyz/malkki/neostumbler/ui/composables/ReportUploadButton.kt index 0577db5c..1f77e307 100644 --- a/app/src/main/java/xyz/malkki/neostumbler/ui/composables/ReportUploadButton.kt +++ b/app/src/main/java/xyz/malkki/neostumbler/ui/composables/ReportUploadButton.kt @@ -21,7 +21,6 @@ import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.style.TextOverflow import androidx.core.content.ContextCompat -import androidx.lifecycle.asFlow import androidx.work.BackoffPolicy import androidx.work.Constraints import androidx.work.ExistingWorkPolicy @@ -47,8 +46,7 @@ import kotlin.time.toJavaDuration /** * Returns a flow which emits booleans indicating whether an upload can be started */ -private fun WorkManager.getCanUploadFlow(): Flow = getWorkInfosForUniqueWorkLiveData(ReportSendWorker.ONE_TIME_WORK_NAME) - .asFlow() +private fun WorkManager.getCanUploadFlow(): Flow = getWorkInfosForUniqueWorkFlow(ReportSendWorker.ONE_TIME_WORK_NAME) .map { workInfos -> workInfos.none { workInfo -> workInfo.state == WorkInfo.State.ENQUEUED