mirror of
https://github.com/oxen-io/session-android.git
synced 2025-06-09 05:48:34 +00:00
Remove jumpiness when rendering reactions.
This commit is contained in:
parent
b8ccc4453e
commit
00b6a222bd
@ -42,7 +42,6 @@ import android.util.AttributeSet;
|
|||||||
import android.util.TypedValue;
|
import android.util.TypedValue;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.view.ViewTreeObserver;
|
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
@ -912,10 +911,7 @@ public class ConversationItem extends LinearLayout implements BindableConversati
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bodyBubble.getWidth() != 0) {
|
setReactionsWithWidth(current, bodyBubble.getWidth());
|
||||||
setReactionsWithWidth(current, bodyBubble.getWidth());
|
|
||||||
}
|
|
||||||
|
|
||||||
bodyBubble.setOnSizeChangedListener((width, height) -> setReactionsWithWidth(current, width));
|
bodyBubble.setOnSizeChangedListener((width, height) -> setReactionsWithWidth(current, width));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,8 +55,6 @@ public class ReactionsConversationView extends LinearLayout {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void clear() {
|
public void clear() {
|
||||||
this.records.clear();
|
this.records.clear();
|
||||||
this.bubbleWidth = 0;
|
this.bubbleWidth = 0;
|
||||||
@ -78,7 +76,9 @@ public class ReactionsConversationView extends LinearLayout {
|
|||||||
removeAllViews();
|
removeAllViews();
|
||||||
|
|
||||||
for (Reaction reaction : reactions) {
|
for (Reaction reaction : reactions) {
|
||||||
addView(buildPill(getContext(), this, reaction));
|
View pill = buildPill(getContext(), this, reaction);
|
||||||
|
pill.setVisibility(bubbleWidth == 0 ? INVISIBLE : VISIBLE);
|
||||||
|
addView(pill);
|
||||||
}
|
}
|
||||||
|
|
||||||
measure(MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED), MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED));
|
measure(MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED), MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user