Fix possible crashes similar to #191

This commit is contained in:
len 2016-03-02 14:07:54 +01:00
parent fad0027e17
commit ae9c412b6d
2 changed files with 2 additions and 2 deletions

View file

@ -104,7 +104,7 @@ class SettingsAboutFragment : SettingsNestedFragment() {
.negativeText(getString(R.string.update_check_ignore))
.onPositive { dialog, which ->
// User output that download has started
context.toast(R.string.update_check_download_started)
activity.toast(R.string.update_check_download_started)
// Start download
UpdateDownloader(activity.applicationContext).execute(downloadLink)
}.show()

View file

@ -76,7 +76,7 @@ class SettingsDownloadsFragment : SettingsNestedFragment() {
File.separator + getString(R.string.app_name) +
File.separator + "downloads"
return mutableListOf(File(defaultDir)) + context.getExternalFilesDirs("")
return mutableListOf(File(defaultDir)) + activity.getExternalFilesDirs("")
}
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {