mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-27 12:05: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;
|
this.slide = slide;
|
||||||
buildGlideRequest(slide, masterSecret).into(image);
|
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));
|
downloadButton.setOnClickListener(new ThumbnailClickDispatcher(downloadClickListener, slide));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -338,10 +342,9 @@ public class ThumbnailView extends FrameLayout {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
if (listener != null) {
|
if (listener != null)
|
||||||
|
{
|
||||||
listener.onClick(view, slide);
|
listener.onClick(view, slide);
|
||||||
} else {
|
|
||||||
Log.w(TAG, "onClick, but no thumbnail click listener attached.");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user