v4.4.2 - Fixed transceivers retention, various minor tweaks

This commit is contained in:
Arty Bishop committed 2026-06-21 15:19:47 +01:00
1 parent f4aef4f4f0
commit 7b6fb5eb8f
7 files changed
+20 -16

No files matched your search

@@ -74,7 +74,6 @@ class LocalSource(private val look4SatDao: Look4SatDao) : ILocalSource {
}
override suspend fun insertRadios(radios: List<SatRadio>) {
look4SatDao.deleteRadios()
look4SatDao.insertRadios(radios.toFrameworkRadios())
}
@@ -24,6 +24,7 @@ import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.withContext
import okhttp3.OkHttpClient
import okhttp3.Request
import java.io.ByteArrayInputStream
import java.io.InputStream
class RemoteSource(
@@ -45,7 +46,10 @@ class RemoteSource(
override suspend fun getNetworkStream(url: String): InputStream? = withContext(dispatcher) {
try {
val networkRequest = Request.Builder().url(url).build()
httpClient.newCall(networkRequest).execute().body.byteStream()
httpClient.newCall(networkRequest).execute().use { response ->
if (!response.isSuccessful) return@withContext null
ByteArrayInputStream(response.body.bytes())
}
} catch (exception: Exception) {
println("RemoteSource network stream exception: $exception")
null
@@ -49,9 +49,9 @@
\n\nPlease update the database at least weekly to get accurate predictions.</string>
<string name="pass_whatsnew_title" translatable="false">What\'s new in Look4Sat</string>
<string name="pass_whatsnew_message" translatable="false">
* Enabled continuous SSTV decoding for manually selected types (Play button enables/disables decoding)
\n\n* Added selected transceiver\'s frequency display to SSTV page
\n\n* Fixed Reset/Save/Play buttons behavior and states on SSTV page
* Fixed transceivers retention on a failed fetch from server
\n\n* Fixed SSTV frequency display, no transceiver selected hint
\n\n* Fixed All satellite category retention on Satellites screen
</string>
<!-- Radar screen -->