Fix crashes on settings

This commit is contained in:
len 2016-03-25 15:50:25 +01:00
parent 218ea7267d
commit bf1fdda651
2 changed files with 3 additions and 3 deletions

View File

@ -108,7 +108,7 @@ class SettingsAboutFragment : SettingsNestedFragment() {
UpdateDownloader(activity.applicationContext).execute(downloadLink)
}.show()
} else {
context.toast(R.string.update_check_no_new_updates)
activity.toast(R.string.update_check_no_new_updates)
}
}, {
it.printStackTrace()

View File

@ -74,10 +74,10 @@ class SettingsAdvancedFragment : SettingsNestedFragment() {
dialog.incrementProgress(1)
}, {
dialog.dismiss()
context.toast(R.string.cache_delete_error)
activity.toast(R.string.cache_delete_error)
}, {
dialog.dismiss()
context.toast(getString(R.string.cache_deleted, deletedFiles.get()))
activity.toast(getString(R.string.cache_deleted, deletedFiles.get()))
preference.summary = getString(R.string.used_cache, chapterCache.readableSize)
})
}