Show if subscribed to folder

pull/155/head
M66B 6 years ago
parent ea8d6cf591
commit 661422d8ec

@ -90,6 +90,7 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
private View vwLevel;
private ImageView ivExpander;
private ImageView ivNotify;
private ImageView ivSubscribed;
private TextView tvName;
private TextView tvMessages;
private ImageView ivMessages;
@ -121,6 +122,7 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
vwLevel = itemView.findViewById(R.id.vwLevel);
ivExpander = itemView.findViewById(R.id.ivExpander);
ivNotify = itemView.findViewById(R.id.ivNotify);
ivSubscribed = itemView.findViewById(R.id.ivSubscribed);
tvName = itemView.findViewById(R.id.tvName);
tvMessages = itemView.findViewById(R.id.tvMessages);
ivMessages = itemView.findViewById(R.id.ivMessages);
@ -225,6 +227,7 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
ivExpander.setVisibility(account < 0 || !collapsable ? View.GONE : (folder.childs > 0 ? View.VISIBLE : View.INVISIBLE));
ivNotify.setVisibility(folder.notify ? View.VISIBLE : View.GONE);
ivSubscribed.setVisibility(BuildConfig.DEBUG && folder.subscribed != null && folder.subscribed ? View.VISIBLE : View.GONE);
if (folder.unseen > 0)
tvName.setText(context.getString(R.string.title_name_count,

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M17,3H7c-1.1,0 -1.99,0.9 -1.99,2L5,21l7,-3 7,3V5c0,-1.1 -0.9,-2 -2,-2z"/>
</vector>

@ -110,8 +110,8 @@
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginTop="24dp"
android:contentDescription="@string/title_legend_notify"
android:src="@drawable/baseline_notifications_24"
android:contentDescription="@string/title_legend_subscribed"
android:src="@drawable/baseline_bookmark_24"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/ivJunk" />
@ -120,13 +120,35 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="18dp"
android:text="@string/title_legend_notify"
android:text="@string/title_legend_subscribed"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
app:layout_constraintBottom_toBottomOf="@id/ivNotify"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/ivNotify"
app:layout_constraintTop_toTopOf="@id/ivNotify" />
<ImageView
android:id="@+id/ivSubscribed"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginTop="24dp"
android:contentDescription="@string/title_legend_notify"
android:src="@drawable/baseline_notifications_24"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/ivNotify" />
<TextView
android:id="@+id/tvSubscribed"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="18dp"
android:text="@string/title_legend_notify"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
app:layout_constraintBottom_toBottomOf="@id/ivSubscribed"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/ivSubscribed"
app:layout_constraintTop_toTopOf="@id/ivSubscribed" />
<ImageView
android:id="@+id/ivUnified"
android:layout_width="24dp"
@ -135,7 +157,7 @@
android:contentDescription="@string/title_legend_unified"
android:src="@drawable/baseline_folder_special_24"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/ivNotify" />
app:layout_constraintTop_toBottomOf="@id/ivSubscribed" />
<TextView
android:id="@+id/tvUnified"

@ -74,6 +74,17 @@
app:layout_constraintStart_toEndOf="@id/ivExpander"
app:layout_constraintTop_toTopOf="@+id/tvName" />
<ImageView
android:id="@+id/ivSubscribed"
android:layout_width="30dp"
android:layout_height="24dp"
android:contentDescription="@string/title_legend_notify"
android:paddingEnd="6dp"
android:src="@drawable/baseline_bookmark_24"
app:layout_constraintBottom_toBottomOf="@+id/tvName"
app:layout_constraintStart_toEndOf="@id/ivNotify"
app:layout_constraintTop_toTopOf="@+id/tvName" />
<TextView
android:id="@+id/tvName"
android:layout_width="0dp"
@ -87,7 +98,7 @@
android:text="Name"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
app:layout_constraintEnd_toStartOf="@+id/tvMessages"
app:layout_constraintStart_toEndOf="@id/ivNotify"
app:layout_constraintStart_toEndOf="@id/ivSubscribed"
app:layout_constraintTop_toTopOf="parent" />
<TextView

@ -513,6 +513,7 @@
<string name="title_legend_trash">Trash</string>
<string name="title_legend_junk">Spam</string>
<string name="title_legend_notify">Notify new messages</string>
<string name="title_legend_subscribed">Subscribed to</string>
<string name="title_legend_unified">Unified inbox / primary account</string>
<string name="title_legend_primary_disconnected">Account disconnected</string>
<string name="title_legend_primary_connected">Account connected</string>

Loading…
Cancel
Save