1
0
Fork 1

Maybe just not animating will fix some of these races

This commit is contained in:
Arne 2024-11-18 22:53:43 +01:00
parent 475c556918
commit df5fa56abf
2 changed files with 1 additions and 3 deletions

View file

@ -1815,7 +1815,6 @@ public class ConversationFragment extends XmppFragment
@Override
protected void onQuery(@Nullable CharSequence query) {
getRecyclerView().getItemAnimator().endAnimations();
final var allUsers = conversation.getMucOptions().getUsers();
if (!conversation.getMucOptions().getUsersByRole(MucOptions.Role.MODERATOR).isEmpty()) {
final var u = new MucOptions.User(conversation.getMucOptions(), null, "\0role:moderator", "Notify active moderators", new HashSet<>());
@ -1913,7 +1912,6 @@ public class ConversationFragment extends XmppFragment
@Override
protected void onViewHidden() {
if (getRecyclerView() == null) return;
try { getRecyclerView().getItemAnimator().endAnimations(); } catch (final Exception e) { }
super.onViewHidden();
}
@ -1922,6 +1920,7 @@ public class ConversationFragment extends XmppFragment
emojiDebounce.removeCallbacksAndMessages(null);
emojiDebounce.postDelayed(() -> {
if (getRecyclerView() == null) return;
getRecyclerView().setItemAnimator(null);
adapter.search(activity, getRecyclerView(), query.toString());
}, 100L);
}

View file

@ -298,7 +298,6 @@ public class EmojiSearch {
// Acquire outside so to not block UI thread
doingUpdate.acquire();
activity.runOnUiThread(() -> {
try { view.getItemAnimator().endAnimations(); } catch (final Exception e) { }
submitList(results, () -> {
activity.runOnUiThread(() -> doingUpdate.release());
});