Compare commits

...

4 Commits

Author SHA1 Message Date
aminecmi
a8721ad7a4 Should intercept socket timeout errors. 2019-01-30 21:11:24 +01:00
Amine Bou
bc5e882894 New translations strings.xml (Chinese Traditional) (#280) 2019-01-29 08:39:28 +01:00
aminecmi
e3460322b1 Closes #279. 2019-01-27 13:59:28 +01:00
aminecmi
7e3288a076 For now not sending issue report for #278. 2019-01-27 13:47:41 +01:00
4 changed files with 22 additions and 6 deletions

View File

@@ -519,7 +519,9 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener {
) )
} }
} else { } else {
val filteredTags = maybeTags.filterNot { hiddenTags.contains(it.tag) } val filteredTags = maybeTags
.filterNot { hiddenTags.contains(it.tag) }
.sortedBy { it.unread == 0 }
tagsBadge = filteredTags.map { tagsBadge = filteredTags.map {
val gd = GradientDrawable() val gd = GradientDrawable()
val color = try { val color = try {

View File

@@ -12,7 +12,10 @@ import com.burgstaller.okhttp.digest.CachingAuthenticator
import com.burgstaller.okhttp.digest.Credentials import com.burgstaller.okhttp.digest.Credentials
import com.burgstaller.okhttp.digest.DigestAuthenticator import com.burgstaller.okhttp.digest.DigestAuthenticator
import com.google.gson.GsonBuilder import com.google.gson.GsonBuilder
import okhttp3.Interceptor
import okhttp3.OkHttpClient import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.Response
import okhttp3.logging.HttpLoggingInterceptor import okhttp3.logging.HttpLoggingInterceptor
import retrofit2.Call import retrofit2.Call
import retrofit2.Retrofit import retrofit2.Retrofit
@@ -62,6 +65,17 @@ class SelfossApi(
.maybeWithSelfSigned(isWithSelfSignedCert) .maybeWithSelfSigned(isWithSelfSignedCert)
.authenticator(CachingAuthenticatorDecorator(this, authCache)) .authenticator(CachingAuthenticatorDecorator(this, authCache))
.addInterceptor(AuthenticationCacheInterceptor(authCache)) .addInterceptor(AuthenticationCacheInterceptor(authCache))
.addInterceptor(object: Interceptor {
override fun intercept(chain: Interceptor.Chain): Response {
val request: Request = chain.request()
val response: Response = chain.proceed(request)
if (response.code() == 408) {
return response
}
return response
}
})
} }
init { init {

View File

@@ -130,7 +130,7 @@ class ArticleFragment : Fragment() {
typeface = try { typeface = try {
ResourcesCompat.getFont(context!!, resId)!! ResourcesCompat.getFont(context!!, resId)!!
} catch (e: java.lang.Exception) { } catch (e: java.lang.Exception) {
ACRA.getErrorReporter().maybeHandleSilentException(Throwable("Font loading issue: ${e.message}"), context!!) // ACRA.getErrorReporter().maybeHandleSilentException(Throwable("Font loading issue: ${e.message}"), context!!)
// Just to be sure // Just to be sure
null null
} }

View File

@@ -4,15 +4,15 @@
<string name="app_name">"Selfoss 阅读器"</string> <string name="app_name">"Selfoss 阅读器"</string>
<string name="title_activity_login">"登录"</string> <string name="title_activity_login">"登录"</string>
<string name="prompt_password">"密码"</string> <string name="prompt_password">"密码"</string>
<string name="prompt_http_password">"HTTP 密"</string> <string name="prompt_http_password">"HTTP 密"</string>
<string name="action_sign_in">"转至"</string> <string name="action_sign_in">"转至"</string>
<string name="error_invalid_password">"密码不够长"</string> <string name="error_invalid_password">"密码不够长"</string>
<string name="error_field_required">"必填字段"</string> <string name="error_field_required">"欄位必填"</string>
<string name="prompt_url">"网址"</string> <string name="prompt_url">"网址"</string>
<string name="withLoginSwitch">"需要登"</string> <string name="withLoginSwitch">"需要登"</string>
<string name="withHttpLoginSwitch">"请先登录网站"</string> <string name="withHttpLoginSwitch">"请先登录网站"</string>
<string name="login_url_problem">"哎呀。您可能需要在网址的末尾添加一个 \"/\"。"</string> <string name="login_url_problem">"哎呀。您可能需要在网址的末尾添加一个 \"/\"。"</string>
<string name="prompt_login">"用户名"</string> <string name="prompt_login">"使用者名稱"</string>
<string name="prompt_http_login">"HTTP 用户名"</string> <string name="prompt_http_login">"HTTP 用户名"</string>
<string name="label_share">"分享"</string> <string name="label_share">"分享"</string>
<string name="readAll">"全部阅读"</string> <string name="readAll">"全部阅读"</string>