Fix payments banner causing weird conversation list animations.

fork-5.53.8
Greyson Parrelli 2021-11-15 11:21:45 -05:00
rodzic dce8fde195
commit 18bb876d1b
2 zmienionych plików z 11 dodań i 15 usunięć

Wyświetl plik

@ -315,6 +315,7 @@ public class ConversationListFragment extends MainFragment implements ActionMode
updateReminders();
EventBus.getDefault().register(this);
itemAnimator.disable();
if (Util.isDefaultSmsProvider(requireContext())) {
InsightsLauncher.showInsightsModal(requireContext(), requireFragmentManager());
@ -355,6 +356,7 @@ public class ConversationListFragment extends MainFragment implements ActionMode
super.onStart();
ConversationFragment.prepare(requireContext());
ApplicationDependencies.getAppForegroundObserver().addListener(appForegroundObserver);
itemAnimator.disable();
}
@Override
@ -695,30 +697,18 @@ public class ConversationListFragment extends MainFragment implements ActionMode
}
private void animatePaymentUnreadStatusIn() {
animatePaymentUnreadStatus(ConstraintSet.VISIBLE);
paymentNotificationView.get().setVisibility(View.VISIBLE);
unreadPaymentsDot.animate().alpha(1);
}
private void animatePaymentUnreadStatusOut() {
if (paymentNotificationView.resolved()) {
animatePaymentUnreadStatus(ConstraintSet.GONE);
paymentNotificationView.get().setVisibility(View.GONE);
}
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) {
result = result != null ? result : SearchResult.EMPTY;
searchAdapter.updateResults(result);

Wyświetl plik

@ -27,8 +27,14 @@ public class ConversationListItemAnimator extends DefaultItemAnimator {
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
public void postDisable(Handler handler) {