Compare commits

..

4 Commits

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>