ui: Replace ErrorMessages getter with indexing operator

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
Harsh Shandilya
2020-03-27 15:38:04 +05:30
parent b9fd3d37f2
commit 536a6f3f83
8 changed files with 12 additions and 12 deletions
@@ -34,7 +34,7 @@ class ModuleDownloaderPreference(context: Context, attrs: AttributeSet?) : Prefe
when {
throwable != null -> {
setState(State.FAILURE)
Toast.makeText(context, ErrorMessages.get(throwable), Toast.LENGTH_LONG).show()
Toast.makeText(context, ErrorMessages[throwable], Toast.LENGTH_LONG).show()
}
result == OsConstants.ENOENT -> setState(State.NOTFOUND)
result == OsConstants.EXIT_SUCCESS -> {