diff options
| author | Samuel Tardieu <sam@rfc1149.net> | 2014-02-17 20:45:21 +0100 |
|---|---|---|
| committer | Samuel Tardieu <sam@rfc1149.net> | 2014-02-17 20:45:24 +0100 |
| commit | c448e8243bf2f257619b84ee6c9f90705ba26d2d (patch) | |
| tree | af44509aeb1b5a3d3089fadc23e86cddbbf11da7 /main/src/cgeo | |
| parent | bc1d72e7adfa783dfad9baee72c22d2bbcfb2153 (diff) | |
| download | cgeo-c448e8243bf2f257619b84ee6c9f90705ba26d2d.zip cgeo-c448e8243bf2f257619b84ee6c9f90705ba26d2d.tar.gz cgeo-c448e8243bf2f257619b84ee6c9f90705ba26d2d.tar.bz2 | |
Intercept InterruptedException in chained observables
The source of those exceptions need to be investigated further.
Diffstat (limited to 'main/src/cgeo')
| -rw-r--r-- | main/src/cgeo/geocaching/ui/ImagesList.java | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/main/src/cgeo/geocaching/ui/ImagesList.java b/main/src/cgeo/geocaching/ui/ImagesList.java index 4058e15..d380e6b 100644 --- a/main/src/cgeo/geocaching/ui/ImagesList.java +++ b/main/src/cgeo/geocaching/ui/ImagesList.java @@ -100,11 +100,17 @@ public class ImagesList { assert(imageView != null); subscriptions.add(AndroidObservable.fromActivity(activity, imgGetter.fetchDrawable(img.getUrl())) .subscribe(new Action1<BitmapDrawable>() { - @Override - public void call(final BitmapDrawable image) { - display(imageView, image, img, rowView); - } - })); + @Override + public void call(final BitmapDrawable image) { + display(imageView, image, img, rowView); + } + }, new Action1<Throwable>() { + @Override + public void call(final Throwable e) { + // Ignore error due to interruptions. + // FIXME: why is this necessary? + } + })); rowView.addView(imageView); imagesView.addView(rowView); } |
