mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-27 20:15:21 +00:00
Don't close cursor prematurely
This commit is contained in:
parent
d1f00b6d77
commit
2d42d22df4
@ -311,11 +311,6 @@ public class MediaPreviewActivity extends PassphraseRequiredActionBarActivity im
|
|||||||
private int cleanupMedia() {
|
private int cleanupMedia() {
|
||||||
int restartItem = mediaPager.getCurrentItem();
|
int restartItem = mediaPager.getCurrentItem();
|
||||||
|
|
||||||
PagerAdapter adapter = mediaPager.getAdapter();
|
|
||||||
if (adapter instanceof CursorPagerAdapter) {
|
|
||||||
((CursorPagerAdapter)adapter).cursor.close();
|
|
||||||
}
|
|
||||||
|
|
||||||
mediaPager.removeAllViews();
|
mediaPager.removeAllViews();
|
||||||
mediaPager.setAdapter(null);
|
mediaPager.setAdapter(null);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user