kopia lustrzana https://github.com/ryukoposting/Signal-Android
rodzic
2c3228d6df
commit
8a49534e2b
|
@ -224,7 +224,6 @@ public class ConversationFragment extends LoggingFragment implements Multiselect
|
||||||
private Animation scrollButtonOutAnimation;
|
private Animation scrollButtonOutAnimation;
|
||||||
private Animation mentionButtonOutAnimation;
|
private Animation mentionButtonOutAnimation;
|
||||||
private OnScrollListener conversationScrollListener;
|
private OnScrollListener conversationScrollListener;
|
||||||
private int pulsePosition = -1;
|
|
||||||
private int lastSeenScrollOffset;
|
private int lastSeenScrollOffset;
|
||||||
private View toolbarShadow;
|
private View toolbarShadow;
|
||||||
private Stopwatch startupStopwatch;
|
private Stopwatch startupStopwatch;
|
||||||
|
@ -1190,17 +1189,13 @@ public class ConversationFragment extends LoggingFragment implements Multiselect
|
||||||
if (Math.abs(layoutManager.findFirstVisibleItemPosition() - p) < SCROLL_ANIMATION_THRESHOLD) {
|
if (Math.abs(layoutManager.findFirstVisibleItemPosition() - p) < SCROLL_ANIMATION_THRESHOLD) {
|
||||||
View child = layoutManager.findViewByPosition(position);
|
View child = layoutManager.findViewByPosition(position);
|
||||||
|
|
||||||
if (child != null && layoutManager.isViewPartiallyVisible(child, true, false)) {
|
if (child == null || !layoutManager.isViewPartiallyVisible(child, true, false)) {
|
||||||
getListAdapter().pulseAtPosition(position);
|
layoutManager.scrollToPositionWithOffset(p, list.getHeight() / 4);
|
||||||
} else {
|
|
||||||
pulsePosition = position;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
layoutManager.scrollToPositionWithOffset(p, list.getHeight() / 4);
|
|
||||||
} else {
|
} else {
|
||||||
layoutManager.scrollToPositionWithOffset(p, list.getHeight() / 4);
|
layoutManager.scrollToPositionWithOffset(p, list.getHeight() / 4);
|
||||||
getListAdapter().pulseAtPosition(position);
|
|
||||||
}
|
}
|
||||||
|
getListAdapter().pulseAtPosition(position);
|
||||||
})
|
})
|
||||||
))
|
))
|
||||||
.withOnInvalidPosition(() -> {
|
.withOnInvalidPosition(() -> {
|
||||||
|
@ -1381,11 +1376,6 @@ public class ConversationFragment extends LoggingFragment implements Multiselect
|
||||||
conversationDateHeader.show();
|
conversationDateHeader.show();
|
||||||
} else if (newState == RecyclerView.SCROLL_STATE_IDLE) {
|
} else if (newState == RecyclerView.SCROLL_STATE_IDLE) {
|
||||||
conversationDateHeader.hide();
|
conversationDateHeader.hide();
|
||||||
|
|
||||||
if (pulsePosition != -1) {
|
|
||||||
getListAdapter().pulseAtPosition(pulsePosition);
|
|
||||||
pulsePosition = -1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue