kopia lustrzana https://github.com/ryukoposting/Signal-Android
Fix payments banner causing weird conversation list animations.
rodzic
dce8fde195
commit
18bb876d1b
|
@ -315,6 +315,7 @@ public class ConversationListFragment extends MainFragment implements ActionMode
|
||||||
|
|
||||||
updateReminders();
|
updateReminders();
|
||||||
EventBus.getDefault().register(this);
|
EventBus.getDefault().register(this);
|
||||||
|
itemAnimator.disable();
|
||||||
|
|
||||||
if (Util.isDefaultSmsProvider(requireContext())) {
|
if (Util.isDefaultSmsProvider(requireContext())) {
|
||||||
InsightsLauncher.showInsightsModal(requireContext(), requireFragmentManager());
|
InsightsLauncher.showInsightsModal(requireContext(), requireFragmentManager());
|
||||||
|
@ -355,6 +356,7 @@ public class ConversationListFragment extends MainFragment implements ActionMode
|
||||||
super.onStart();
|
super.onStart();
|
||||||
ConversationFragment.prepare(requireContext());
|
ConversationFragment.prepare(requireContext());
|
||||||
ApplicationDependencies.getAppForegroundObserver().addListener(appForegroundObserver);
|
ApplicationDependencies.getAppForegroundObserver().addListener(appForegroundObserver);
|
||||||
|
itemAnimator.disable();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -695,30 +697,18 @@ public class ConversationListFragment extends MainFragment implements ActionMode
|
||||||
}
|
}
|
||||||
|
|
||||||
private void animatePaymentUnreadStatusIn() {
|
private void animatePaymentUnreadStatusIn() {
|
||||||
animatePaymentUnreadStatus(ConstraintSet.VISIBLE);
|
paymentNotificationView.get().setVisibility(View.VISIBLE);
|
||||||
unreadPaymentsDot.animate().alpha(1);
|
unreadPaymentsDot.animate().alpha(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void animatePaymentUnreadStatusOut() {
|
private void animatePaymentUnreadStatusOut() {
|
||||||
if (paymentNotificationView.resolved()) {
|
if (paymentNotificationView.resolved()) {
|
||||||
animatePaymentUnreadStatus(ConstraintSet.GONE);
|
paymentNotificationView.get().setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
unreadPaymentsDot.animate().alpha(0);
|
unreadPaymentsDot.animate().alpha(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void animatePaymentUnreadStatus(int constraintSetVisibility) {
|
|
||||||
paymentNotificationView.get();
|
|
||||||
|
|
||||||
TransitionManager.beginDelayedTransition(constraintLayout);
|
|
||||||
|
|
||||||
ConstraintSet currentLayout = new ConstraintSet();
|
|
||||||
currentLayout.clone(constraintLayout);
|
|
||||||
|
|
||||||
currentLayout.setVisibility(R.id.payments_notification, constraintSetVisibility);
|
|
||||||
currentLayout.applyTo(constraintLayout);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void onSearchResultChanged(@Nullable SearchResult result) {
|
private void onSearchResultChanged(@Nullable SearchResult result) {
|
||||||
result = result != null ? result : SearchResult.EMPTY;
|
result = result != null ? result : SearchResult.EMPTY;
|
||||||
searchAdapter.updateResults(result);
|
searchAdapter.updateResults(result);
|
||||||
|
|
|
@ -27,8 +27,14 @@ public class ConversationListItemAnimator extends DefaultItemAnimator {
|
||||||
shouldDisable = false;
|
shouldDisable = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@MainThread
|
||||||
|
public void disable() {
|
||||||
|
setMoveDuration(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* We need to reasonable ensure that the animation has started before we disable things here, so we add a slight delay.
|
* We need to reasonably ensure that the animation has started before we disable things here, so we add a slight delay.
|
||||||
*/
|
*/
|
||||||
@MainThread
|
@MainThread
|
||||||
public void postDisable(Handler handler) {
|
public void postDisable(Handler handler) {
|
||||||
|
|
Ładowanie…
Reference in New Issue