feat(app): апдейтер только в sideload; API/BASE_URL на https

This commit is contained in:
nk
2026-06-08 14:03:21 +03:00
parent 34bd6ab02e
commit 8dc0d46c40
3 changed files with 4 additions and 2 deletions

View File

@@ -117,6 +117,8 @@ class MainActivity : ComponentActivity() {
var downloadedApk by remember { mutableStateOf<java.io.File?>(null) }
val updateScope = rememberCoroutineScope()
LaunchedEffect(Unit) {
// Авто-обновление только в sideload-сборке (в store обновляет RuStore).
if (!BuildConfig.ENABLE_SELF_UPDATE) return@LaunchedEffect
val info = com.radiola.update.UpdateManager.checkUpdate() ?: return@LaunchedEffect
if (info.versionCode > BuildConfig.VERSION_CODE) pendingUpdate = info
}

View File

@@ -123,7 +123,7 @@ object AppModule {
@Named("radiolaClient") okHttpClient: OkHttpClient,
json: Json
): Retrofit = Retrofit.Builder()
.baseUrl("http://121.127.37.212:3000/")
.baseUrl("https://api.radiola.nexaweb.su/")
.client(okHttpClient)
.addConverterFactory(json.asConverterFactory("application/json".toMediaType()))
.build()

View File

@@ -32,7 +32,7 @@ data class VersionInfo(
*/
object UpdateManager {
private const val TAG = "radiOLA/Update"
private const val BASE_URL = "http://121.127.37.212:3000"
private const val BASE_URL = "https://api.radiola.nexaweb.su"
private val client = OkHttpClient.Builder()
.connectTimeout(10, TimeUnit.SECONDS)