mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-23 18:15:22 +00:00
only allow thumbnail clicks when slide is present
fixes #4024 Closes #4040 // FREEBIE
This commit is contained in:
parent
b5216ed7af
commit
adc6fc8524
@ -183,7 +183,11 @@ public class ThumbnailView extends FrameLayout {
|
||||
|
||||
this.slide = slide;
|
||||
buildGlideRequest(slide, masterSecret).into(image);
|
||||
setOnClickListener(new ThumbnailClickDispatcher(thumbnailClickListener, slide));
|
||||
if (this.slide.getTransferProgress() == PartDatabase.TRANSFER_PROGRESS_DONE) {
|
||||
setOnClickListener(new ThumbnailClickDispatcher(thumbnailClickListener, slide));
|
||||
} else {
|
||||
setOnClickListener(null);
|
||||
}
|
||||
downloadButton.setOnClickListener(new ThumbnailClickDispatcher(downloadClickListener, slide));
|
||||
}
|
||||
|
||||
@ -338,10 +342,9 @@ public class ThumbnailView extends FrameLayout {
|
||||
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if (listener != null) {
|
||||
if (listener != null)
|
||||
{
|
||||
listener.onClick(view, slide);
|
||||
} else {
|
||||
Log.w(TAG, "onClick, but no thumbnail click listener attached.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user