Skip to content

Commit

Permalink
fix: ProfileGalleryView Click and Swip
Browse files Browse the repository at this point in the history
  • Loading branch information
omg-xtao committed Feb 7, 2024
1 parent 20dff20 commit 99fc6e7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -364,10 +364,6 @@ public void onRelease() {
postInvalidateOnAnimation();
}

@Override
public void onClick() {
}

@Override
public void onPhotosLoaded() {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@

import java.util.ArrayList;

import tw.nekomimi.nekogram.NekoConfig;

public class ProfileGalleryView extends CircularViewPager implements NotificationCenter.NotificationCenterDelegate {

private final PointF downPoint = new PointF();
Expand Down Expand Up @@ -129,7 +131,7 @@ public interface Callback {

void onRelease();

void onClick();
default void onClick() {};

void onPhotosLoaded();

Expand Down Expand Up @@ -1227,9 +1229,9 @@ public void onAnimationReady(ImageReceiver imageReceiver) {

item.imageView.setRoundRadius(roundTopRadius, roundTopRadius, roundBottomRadius, roundBottomRadius);

item.imageView.setOnClickListener(__ -> {
callback.onClick();
});
if (NekoConfig.disablePhotoSideAction.Bool()) {
item.imageView.setOnClickListener(__ -> callback.onClick());
}

item.imageView.setTag(realPosition);

Expand Down

0 comments on commit 99fc6e7

Please sign in to comment.