refactor: remove unused imports and streamline exception handling logic
This commit is contained in:
-1
@@ -1,6 +1,5 @@
|
|||||||
package at.mocode.frontend.core.localdb
|
package at.mocode.frontend.core.localdb
|
||||||
|
|
||||||
import app.cash.sqldelight.db.QueryResult
|
|
||||||
import app.cash.sqldelight.db.SqlCursor
|
import app.cash.sqldelight.db.SqlCursor
|
||||||
import app.cash.sqldelight.db.SqlDriver
|
import app.cash.sqldelight.db.SqlDriver
|
||||||
import app.cash.sqldelight.driver.worker.WebWorkerDriver
|
import app.cash.sqldelight.driver.worker.WebWorkerDriver
|
||||||
|
|||||||
+2
-2
@@ -139,7 +139,7 @@ val networkModule = module {
|
|||||||
// But let's make it robust anyway.
|
// But let's make it robust anyway.
|
||||||
|
|
||||||
// We will use a safe lazy resolution pattern.
|
// We will use a safe lazy resolution pattern.
|
||||||
} catch (e: Exception) {
|
} catch (_: Exception) {
|
||||||
// ignore
|
// ignore
|
||||||
}
|
}
|
||||||
execute(request)
|
execute(request)
|
||||||
@@ -153,7 +153,7 @@ val networkModule = module {
|
|||||||
// Attempt to resolve TokenProvider from the capturing scope
|
// Attempt to resolve TokenProvider from the capturing scope
|
||||||
val tokenProvider = try {
|
val tokenProvider = try {
|
||||||
koinScope.get<TokenProvider>()
|
koinScope.get<TokenProvider>()
|
||||||
} catch (e: Exception) {
|
} catch (_: Exception) {
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
-2
@@ -3,8 +3,6 @@ package at.mocode.ping.feature.data
|
|||||||
import at.mocode.frontend.core.localdb.AppDatabase
|
import at.mocode.frontend.core.localdb.AppDatabase
|
||||||
import at.mocode.frontend.core.sync.SyncableRepository
|
import at.mocode.frontend.core.sync.SyncableRepository
|
||||||
import at.mocode.ping.api.PingEvent
|
import at.mocode.ping.api.PingEvent
|
||||||
import kotlinx.coroutines.Dispatchers
|
|
||||||
import kotlinx.coroutines.withContext
|
|
||||||
|
|
||||||
// ARCH-BLUEPRINT: This repository implements the generic SyncableRepository
|
// ARCH-BLUEPRINT: This repository implements the generic SyncableRepository
|
||||||
// for a specific entity, bridging the gap between the sync core and the local database.
|
// for a specific entity, bridging the gap between the sync core and the local database.
|
||||||
|
|||||||
Reference in New Issue
Block a user