Fix duplicate id error

(cherry picked from commit 692fea953210d4348463b091ff82f2d8e87e1be9)
This commit is contained in:
Stephen Paul Weber 2024-11-28 10:12:50 -05:00 committed by Arne
parent 7b2d5b4210
commit bed5b7202b
2 changed files with 8 additions and 8 deletions

View file

@ -541,13 +541,13 @@ public class ConversationsOverviewFragment extends XmppFragment {
}
setupSwipe();
binding.snackbar.setVisibility(View.GONE);
binding.overviewSnackbar.setVisibility(View.GONE);
if (activity.xmppConnectionService == null) return;
for (final var account : activity.xmppConnectionService.getAccounts()) {
if (account.mamPrefs() != null && !"always".equals(account.mamPrefs().getAttribute("default"))) {
binding.snackbar.setVisibility(View.VISIBLE);
binding.snackbarMessage.setText("Your account " + account.getJid().asBareJid().toEscapedString() + " does not have archiving fully enabled. This may result in missed messages if you use multiple devices or apps.");
binding.snackbarAction.setOnClickListener((v) -> {
binding.overviewSnackbar.setVisibility(View.VISIBLE);
binding.overviewSnackbarMessage.setText("Your account " + account.getJid().asBareJid().toEscapedString() + " does not have archiving fully enabled. This may result in missed messages if you use multiple devices or apps.");
binding.overviewSnackbarAction.setOnClickListener((v) -> {
final var prefs = account.mamPrefs();
prefs.setAttribute("default", "always");
activity.xmppConnectionService.pushMamPreferences(account, prefs);

View file

@ -11,7 +11,7 @@
android:orientation="vertical">
<RelativeLayout
android:id="@+id/snackbar"
android:id="@+id/overview_snackbar"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/context_preview"
@ -23,18 +23,18 @@
android:visibility="gone">
<TextView
android:id="@+id/snackbar_message"
android:id="@+id/overview_snackbar_message"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:layout_marginStart="24dp"
android:layout_toStartOf="@+id/snackbar_action"
android:layout_toStartOf="@+id/overview_snackbar_action"
android:textColor="?colorOnSurfaceInverse"
android:text="Warning" />
<TextView
android:id="@+id/snackbar_action"
android:id="@+id/overview_snackbar_action"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"