mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-23 01:51:51 +01:00
Fix possible crashes similar to #191
This commit is contained in:
parent
fad0027e17
commit
ae9c412b6d
@ -104,7 +104,7 @@ class SettingsAboutFragment : SettingsNestedFragment() {
|
|||||||
.negativeText(getString(R.string.update_check_ignore))
|
.negativeText(getString(R.string.update_check_ignore))
|
||||||
.onPositive { dialog, which ->
|
.onPositive { dialog, which ->
|
||||||
// User output that download has started
|
// User output that download has started
|
||||||
context.toast(R.string.update_check_download_started)
|
activity.toast(R.string.update_check_download_started)
|
||||||
// Start download
|
// Start download
|
||||||
UpdateDownloader(activity.applicationContext).execute(downloadLink)
|
UpdateDownloader(activity.applicationContext).execute(downloadLink)
|
||||||
}.show()
|
}.show()
|
||||||
|
@ -76,7 +76,7 @@ class SettingsDownloadsFragment : SettingsNestedFragment() {
|
|||||||
File.separator + getString(R.string.app_name) +
|
File.separator + getString(R.string.app_name) +
|
||||||
File.separator + "downloads"
|
File.separator + "downloads"
|
||||||
|
|
||||||
return mutableListOf(File(defaultDir)) + context.getExternalFilesDirs("")
|
return mutableListOf(File(defaultDir)) + activity.getExternalFilesDirs("")
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||||
|
Loading…
Reference in New Issue
Block a user