Commit 55a924a5 authored by Yusuke Iwaki's avatar Yusuke Iwaki

fix pmd issues

parent ad76db4a
...@@ -33,7 +33,7 @@ import chat.rocket.android.helper.RecyclerViewScrolledToBottomListener; ...@@ -33,7 +33,7 @@ import chat.rocket.android.helper.RecyclerViewScrolledToBottomListener;
import chat.rocket.android.helper.TextUtils; import chat.rocket.android.helper.TextUtils;
import chat.rocket.android.layouthelper.chatroom.MessageFormManager; import chat.rocket.android.layouthelper.chatroom.MessageFormManager;
import chat.rocket.android.layouthelper.chatroom.MessageListAdapter; import chat.rocket.android.layouthelper.chatroom.MessageListAdapter;
import chat.rocket.android.layouthelper.chatroom.NewMessageIndicatorManager; import chat.rocket.android.layouthelper.chatroom.AbstractNewMessageIndicatorManager;
import chat.rocket.android.layouthelper.chatroom.PairedMessage; import chat.rocket.android.layouthelper.chatroom.PairedMessage;
import chat.rocket.android.layouthelper.extra_action.MessageExtraActionBehavior; import chat.rocket.android.layouthelper.extra_action.MessageExtraActionBehavior;
import chat.rocket.android.layouthelper.extra_action.upload.AbstractUploadActionItem; import chat.rocket.android.layouthelper.extra_action.upload.AbstractUploadActionItem;
...@@ -75,7 +75,7 @@ public class RoomFragment extends AbstractChatRoomFragment ...@@ -75,7 +75,7 @@ public class RoomFragment extends AbstractChatRoomFragment
private RealmObjectObserver<LoadMessageProcedure> procedureObserver; private RealmObjectObserver<LoadMessageProcedure> procedureObserver;
private MessageFormManager messageFormManager; private MessageFormManager messageFormManager;
private RecyclerViewAutoScrollManager autoScrollManager; private RecyclerViewAutoScrollManager autoScrollManager;
private NewMessageIndicatorManager newMessageIndicatorManager; private AbstractNewMessageIndicatorManager newMessageIndicatorManager;
private Snackbar unreadIndicator; private Snackbar unreadIndicator;
private boolean previousUnreadMessageExists; private boolean previousUnreadMessageExists;
...@@ -173,7 +173,7 @@ public class RoomFragment extends AbstractChatRoomFragment ...@@ -173,7 +173,7 @@ public class RoomFragment extends AbstractChatRoomFragment
listView.addOnScrollListener( listView.addOnScrollListener(
new RecyclerViewScrolledToBottomListener(layoutManager, 1, this::markAsReadIfNeeded)); new RecyclerViewScrolledToBottomListener(layoutManager, 1, this::markAsReadIfNeeded));
newMessageIndicatorManager = new NewMessageIndicatorManager() { newMessageIndicatorManager = new AbstractNewMessageIndicatorManager() {
@Override @Override
protected void onShowIndicator(int count, boolean onlyAlreadyShown) { protected void onShowIndicator(int count, boolean onlyAlreadyShown) {
if ((onlyAlreadyShown && unreadIndicator != null && unreadIndicator.isShown()) if ((onlyAlreadyShown && unreadIndicator != null && unreadIndicator.isShown())
......
...@@ -40,8 +40,8 @@ public class RecyclerViewScrolledToBottomListener extends RecyclerView.OnScrollL ...@@ -40,8 +40,8 @@ public class RecyclerViewScrolledToBottomListener extends RecyclerView.OnScrollL
@Override @Override
public void onScrolled(RecyclerView recyclerView, int dx, int dy) { public void onScrolled(RecyclerView recyclerView, int deltaX, int deltaY) {
super.onScrolled(recyclerView, dx, dy); super.onScrolled(recyclerView, deltaX, deltaY);
handler.removeMessages(0); handler.removeMessages(0);
handler.sendEmptyMessageDelayed(0, 120); handler.sendEmptyMessageDelayed(0, 120);
} }
......
...@@ -3,7 +3,7 @@ package chat.rocket.android.layouthelper.chatroom; ...@@ -3,7 +3,7 @@ package chat.rocket.android.layouthelper.chatroom;
/** /**
* manager class for showing "You have XX messages" indicator. * manager class for showing "You have XX messages" indicator.
*/ */
public abstract class NewMessageIndicatorManager { public abstract class AbstractNewMessageIndicatorManager {
private int count; private int count;
private boolean onlyAlreadyShown; private boolean onlyAlreadyShown;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment