mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-27 12:05:22 +00:00
Add more info to unselect exception
This commit is contained in:
parent
41dde12530
commit
9f15039188
@ -565,8 +565,12 @@ public class MediaPreviewActivity extends PassphraseRequiredActionBarActivity im
|
||||
public void onPageUnselected(int position) {
|
||||
if (adapter == null) return;
|
||||
|
||||
MediaItem item = adapter.getMediaItemFor(position);
|
||||
if (item.recipient != null) item.recipient.removeListener(MediaPreviewActivity.this);
|
||||
try {
|
||||
MediaItem item = adapter.getMediaItemFor(position);
|
||||
if (item.recipient != null) item.recipient.removeListener(MediaPreviewActivity.this);
|
||||
} catch (CursorIndexOutOfBoundsException e) {
|
||||
throw new RuntimeException("position = " + position + " leftIsRecent = " + leftIsRecent, e);
|
||||
}
|
||||
|
||||
adapter.pause(position);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user