Fix duplicate id error
(cherry picked from commit 692fea953210d4348463b091ff82f2d8e87e1be9)
This commit is contained in:
parent
7b2d5b4210
commit
bed5b7202b
2 changed files with 8 additions and 8 deletions
|
@ -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);
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue