Delete some files that are no longer used
This commit is contained in:
@@ -1,43 +0,0 @@
|
||||
package app.klottr.util
|
||||
|
||||
//import android.location.Location
|
||||
import app.klottr.data.NoteEntity
|
||||
import kotlinx.coroutines.flow.MutableSharedFlow
|
||||
import kotlin.math.*
|
||||
|
||||
// OBS: distanceMeters ligger numera i :shared (app.klottr.util.distanceMeters).
|
||||
// Den lokala dubbletten är borttagen för att undvika divergens mellan plattformar.
|
||||
|
||||
|
||||
//fun distanceMeters(lat1: Double, lon1: Double, lat2: Double, lon2: Double): Double {
|
||||
//val R = 6371000.0
|
||||
//val dLat = Math.toRadians(lat2 - lat1)
|
||||
//val dLon = Math.toRadians(lon2 - lon1)
|
||||
//val a = sin(dLat/2).pow(2.0) + cos(Math.toRadians(lat1)) * cos(Math.toRadians(lat2)) * sin(dLon/2).pow(2.0)
|
||||
// return 2 * R * atan2(sqrt(a), sqrt(1 - a))
|
||||
//}
|
||||
|
||||
//fun roundCoord(v: Double): Double = (v * 1e5).roundToInt() / 1e5
|
||||
//
|
||||
//object MatchBus {
|
||||
// val match = MutableSharedFlow<NoteEntity?>(extraBufferCapacity = 1)
|
||||
// fun emit(n: NoteEntity) { match.tryEmit(n) }
|
||||
//}
|
||||
|
||||
//object LastLocationStore {
|
||||
// // Adapter som låter befintlig Android-kod använda android.location.Location,
|
||||
// // men under huven lagras värdet i KMP-store (GeoPoint) i :shared.
|
||||
// var lastKnownLocation: Location?
|
||||
// get() {
|
||||
// val gp = app.klottr.location.LastLocationStore.lastKnownLocation // Hämta från delad store
|
||||
// return gp?.let {
|
||||
// Location("klottr").apply { latitude = it.lat; longitude = it.lon }
|
||||
// }
|
||||
// }
|
||||
// set(value) {
|
||||
// app.klottr.location.LastLocationStore.lastKnownLocation = value?.let {
|
||||
// app.klottr.location.GeoPoint(it.latitude, it.longitude)
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
Reference in New Issue
Block a user