mirror of
https://github.com/tateisu/SubwayTooter
synced 2025-02-06 13:43:33 +01:00
クラッシュレポート対応
This commit is contained in:
parent
9bc50415cc
commit
062afc2294
@ -599,11 +599,16 @@ class ActMediaViewer : AppCompatActivity(), View.OnClickListener {
|
|||||||
) : Pair<TootApiResult?, ByteArray?> {
|
) : Pair<TootApiResult?, ByteArray?> {
|
||||||
val result = TootApiResult.makeWithCaption(url)
|
val result = TootApiResult.makeWithCaption(url)
|
||||||
|
|
||||||
val request = Request.Builder()
|
val request = try{
|
||||||
.url(url)
|
Request.Builder()
|
||||||
.cacheControl(App1.CACHE_CONTROL)
|
.url(url)
|
||||||
.addHeader("Accept", "image/webp,image/*,*/*;q=0.8")
|
.cacheControl(App1.CACHE_CONTROL)
|
||||||
.build()
|
.addHeader("Accept", "image/webp,image/*,*/*;q=0.8")
|
||||||
|
.build()
|
||||||
|
}catch(ex:Throwable){
|
||||||
|
result.setError(ex.withCaption("incorrect URL."))
|
||||||
|
return Pair(result, null)
|
||||||
|
}
|
||||||
|
|
||||||
if(! client.sendRequest(
|
if(! client.sendRequest(
|
||||||
result,
|
result,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user