mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 16:57:50 +00:00
Fix crash when single-selecting large media.
This commit is contained in:
parent
93c1277fd0
commit
148cfd1b53
@ -129,11 +129,13 @@ class MediaSendViewModel extends ViewModel {
|
||||
|
||||
if (filteredMedia.isEmpty()) {
|
||||
error.setValue(Error.ITEM_TOO_LARGE);
|
||||
bucketId.setValue(Media.ALL_MEDIA_BUCKET_ID);
|
||||
} else {
|
||||
bucketId.setValue(filteredMedia.get(0).getBucketId().or(Media.ALL_MEDIA_BUCKET_ID));
|
||||
}
|
||||
|
||||
countButtonVisibility = CountButtonState.Visibility.FORCED_OFF;
|
||||
|
||||
bucketId.setValue(filteredMedia.get(0).getBucketId().or(Media.ALL_MEDIA_BUCKET_ID));
|
||||
selectedMedia.setValue(filteredMedia);
|
||||
countButtonState.setValue(new CountButtonState(filteredMedia.size(), countButtonVisibility));
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user