Always show thread icon in input field when activated

This commit is contained in:
Arne 2024-12-11 23:16:12 +01:00
parent 57f3bc6bb9
commit 5d6f3e363d
2 changed files with 4 additions and 11 deletions

View file

@ -4551,23 +4551,16 @@ public class ConversationFragment extends XmppFragment
}
if (activity == null) return;
final SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(activity);
ViewGroup.LayoutParams params = binding.threadIdenticonLayout.getLayoutParams();
if (identiconWidth < 0) identiconWidth = params.width;
if (hasAttachments || !binding.textinput.getText().toString().replaceFirst("^(\\w|[, ])+:\\s*", "").isEmpty()) {
binding.conversationViewPager.setCurrentItem(0);
params.width = conversation.getThread() == null ? 0 : identiconWidth;
} else if (pref != null && pref.getBoolean("show_thread_feature", getResources().getBoolean(R.bool.show_thread_feature))) {
params.width = identiconWidth;
if (canWrite() && pref != null && pref.getBoolean("show_thread_feature", getResources().getBoolean(R.bool.show_thread_feature))) {
binding.threadIdenticonLayout.setVisibility(VISIBLE);
} else {
params.width = 0;
binding.threadIdenticonLayout.setVisibility(GONE);
}
if (!binding.textinput.getText().toString().isEmpty()) {
binding.quickButtons.setVisibility(GONE);
} else {
binding.quickButtons.setVisibility(VISIBLE);
}
if (!canWrite()) params.width = 0;
binding.threadIdenticonLayout.setLayoutParams(params);
}
protected void updateStatusMessages() {

View file

@ -356,7 +356,7 @@
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginEnd="8dp"
android:layout_marginEnd="6dp"
android:background="@drawable/thread_hint">
<com.lelloman.identicon.view.GithubIdenticonView