mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-24 23:12:55 +00:00
Show account separate notifications
This commit is contained in:
parent
79bbfdd211
commit
44df12724f
3 changed files with 15 additions and 2 deletions
|
@ -63,6 +63,7 @@ public class AdapterAccount extends RecyclerView.Adapter<AdapterAccount.ViewHold
|
||||||
private View view;
|
private View view;
|
||||||
private View vwColor;
|
private View vwColor;
|
||||||
private ImageView ivPrimary;
|
private ImageView ivPrimary;
|
||||||
|
private ImageView ivNotify;
|
||||||
private TextView tvName;
|
private TextView tvName;
|
||||||
private ImageView ivSync;
|
private ImageView ivSync;
|
||||||
private TextView tvUser;
|
private TextView tvUser;
|
||||||
|
@ -79,6 +80,7 @@ public class AdapterAccount extends RecyclerView.Adapter<AdapterAccount.ViewHold
|
||||||
vwColor = itemView.findViewById(R.id.vwColor);
|
vwColor = itemView.findViewById(R.id.vwColor);
|
||||||
ivSync = itemView.findViewById(R.id.ivSync);
|
ivSync = itemView.findViewById(R.id.ivSync);
|
||||||
ivPrimary = itemView.findViewById(R.id.ivPrimary);
|
ivPrimary = itemView.findViewById(R.id.ivPrimary);
|
||||||
|
ivNotify = itemView.findViewById(R.id.ivNotify);
|
||||||
tvName = itemView.findViewById(R.id.tvName);
|
tvName = itemView.findViewById(R.id.tvName);
|
||||||
tvUser = itemView.findViewById(R.id.tvUser);
|
tvUser = itemView.findViewById(R.id.tvUser);
|
||||||
ivState = itemView.findViewById(R.id.ivState);
|
ivState = itemView.findViewById(R.id.ivState);
|
||||||
|
@ -103,6 +105,7 @@ public class AdapterAccount extends RecyclerView.Adapter<AdapterAccount.ViewHold
|
||||||
ivSync.setImageResource(account.synchronize ? R.drawable.baseline_sync_24 : R.drawable.baseline_sync_disabled_24);
|
ivSync.setImageResource(account.synchronize ? R.drawable.baseline_sync_24 : R.drawable.baseline_sync_disabled_24);
|
||||||
|
|
||||||
ivPrimary.setVisibility(account.primary ? View.VISIBLE : View.GONE);
|
ivPrimary.setVisibility(account.primary ? View.VISIBLE : View.GONE);
|
||||||
|
ivNotify.setVisibility(account.notify ? View.VISIBLE : View.GONE);
|
||||||
|
|
||||||
if (settings)
|
if (settings)
|
||||||
tvName.setText(account.name);
|
tvName.setText(account.name);
|
||||||
|
|
|
@ -34,6 +34,7 @@ public class TupleAccountEx extends EntityAccount {
|
||||||
Objects.equals(this.color, other.color) &&
|
Objects.equals(this.color, other.color) &&
|
||||||
this.synchronize.equals(other.synchronize) &&
|
this.synchronize.equals(other.synchronize) &&
|
||||||
this.primary.equals(other.primary) &&
|
this.primary.equals(other.primary) &&
|
||||||
|
this.notify.equals(other.notify) &&
|
||||||
Objects.equals(this.tbd, other.tbd) &&
|
Objects.equals(this.tbd, other.tbd) &&
|
||||||
Objects.equals(this.state, other.state) &&
|
Objects.equals(this.state, other.state) &&
|
||||||
Objects.equals(this.error, other.error) &&
|
Objects.equals(this.error, other.error) &&
|
||||||
|
|
|
@ -43,12 +43,21 @@
|
||||||
android:layout_width="24dp"
|
android:layout_width="24dp"
|
||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:layout_marginStart="6dp"
|
android:layout_marginStart="6dp"
|
||||||
android:layout_marginEnd="6dp"
|
|
||||||
android:src="@drawable/baseline_star_24"
|
android:src="@drawable/baseline_star_24"
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/tvName"
|
app:layout_constraintBottom_toBottomOf="@+id/tvName"
|
||||||
app:layout_constraintStart_toEndOf="@id/ivState"
|
app:layout_constraintStart_toEndOf="@id/ivState"
|
||||||
app:layout_constraintTop_toTopOf="@+id/tvName" />
|
app:layout_constraintTop_toTopOf="@+id/tvName" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/ivNotify"
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:layout_marginStart="6dp"
|
||||||
|
android:src="@drawable/baseline_notifications_24"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/tvName"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/ivPrimary"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/tvName" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvName"
|
android:id="@+id/tvName"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
@ -62,7 +71,7 @@
|
||||||
android:text="Name"
|
android:text="Name"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/ivSync"
|
app:layout_constraintEnd_toStartOf="@+id/ivSync"
|
||||||
app:layout_constraintStart_toEndOf="@id/ivPrimary"
|
app:layout_constraintStart_toEndOf="@id/ivNotify"
|
||||||
app:layout_constraintTop_toBottomOf="@id/marginTop" />
|
app:layout_constraintTop_toBottomOf="@id/marginTop" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
|
Loading…
Reference in a new issue