Localizza errori API, sistema layout mobile e documenta allineamento iOS.
Gli header Accept-Language dalle app e i fix di padding/menu sul web chiudono il giro password-policy; il doc guida il lavoro su Mac. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -2,6 +2,7 @@ package com.matchlivetv.match_live_tv.data
|
||||
|
||||
import android.content.Context
|
||||
import com.matchlivetv.match_live_tv.core.AppConfig
|
||||
import com.matchlivetv.match_live_tv.core.AppLocale
|
||||
import com.matchlivetv.match_live_tv.core.TokenStore
|
||||
import com.matchlivetv.match_live_tv.data.api.MatchLiveApi
|
||||
import com.matchlivetv.match_live_tv.data.cable.SessionCableService
|
||||
@@ -37,10 +38,20 @@ class AppContainer(context: Context) {
|
||||
accessToken?.let { header("Authorization", "Bearer $it") }
|
||||
header("Accept", "application/json")
|
||||
header("Content-Type", "application/json")
|
||||
header("Accept-Language", apiLanguageTag())
|
||||
}.build()
|
||||
chain.proceed(request)
|
||||
}
|
||||
|
||||
private fun apiLanguageTag(): String {
|
||||
val tag = AppLocale.currentTag(appContext)
|
||||
return if (tag.isBlank()) {
|
||||
java.util.Locale.getDefault().language.ifBlank { "it" }
|
||||
} else {
|
||||
tag
|
||||
}
|
||||
}
|
||||
|
||||
private val okHttp = OkHttpClient.Builder()
|
||||
.connectTimeout(30, TimeUnit.SECONDS)
|
||||
.readTimeout(60, TimeUnit.SECONDS)
|
||||
|
||||
Reference in New Issue
Block a user