mirror of
https://github.com/accelforce/Yuito
synced 2024-12-22 21:28:08 +01:00
Ensure that query/fragment/etc. don't get embedded into local filenames (#989)
when downloading #886
This commit is contained in:
parent
71fb4db915
commit
922f165f95
@ -209,8 +209,7 @@ class ViewMediaActivity : BaseActivity(), ViewImageFragment.PhotoActionsListener
|
||||
PERMISSIONS_REQUEST_WRITE_EXTERNAL_STORAGE)
|
||||
} else {
|
||||
val url = attachments!![viewPager.currentItem].attachment.url
|
||||
val filename = File(url).name
|
||||
|
||||
val filename = Uri.parse(url).lastPathSegment
|
||||
val toastText = String.format(resources.getString(R.string.download_image), filename)
|
||||
Toast.makeText(applicationContext, toastText, Toast.LENGTH_SHORT).show()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user