Skip to content

Commit 2349c7d

Browse files
committed
Otus-Android#3 load on error
1 parent e4243b2 commit 2349c7d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app/src/main/java/otus/homework/coroutines/MainActivity.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,10 @@ class MainActivity : AppCompatActivity() {
5454
Picasso.get().load(it.image.url).into(image)
5555
}
5656
}
57-
is Error -> showToast(state.error)
57+
is Error -> {
58+
showToast(state.error)
59+
viewModel.load()
60+
}
5861
}
5962
}
6063
}

0 commit comments

Comments
 (0)