Changed places download/save all

pull/161/head
M66B 6 years ago
parent f5bd4eadc6
commit 02a58bb5c8

@ -286,8 +286,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
private RecyclerView rvAttachment; private RecyclerView rvAttachment;
private CheckBox cbInline; private CheckBox cbInline;
private Button btnDownloadAttachments;
private Button btnSaveAttachments; private Button btnSaveAttachments;
private Button btnDownloadAttachments;
private TextView tvNoInternetAttachments; private TextView tvNoInternetAttachments;
private View vSeparatorBody; private View vSeparatorBody;
@ -428,8 +428,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
rvAttachment.setAdapter(adapterAttachment); rvAttachment.setAdapter(adapterAttachment);
cbInline = attachments.findViewById(R.id.cbInline); cbInline = attachments.findViewById(R.id.cbInline);
btnDownloadAttachments = attachments.findViewById(R.id.btnDownloadAttachments);
btnSaveAttachments = attachments.findViewById(R.id.btnSaveAttachments); btnSaveAttachments = attachments.findViewById(R.id.btnSaveAttachments);
btnDownloadAttachments = attachments.findViewById(R.id.btnDownloadAttachments);
tvNoInternetAttachments = attachments.findViewById(R.id.tvNoInternetAttachments); tvNoInternetAttachments = attachments.findViewById(R.id.tvNoInternetAttachments);
vSeparatorBody = vsBody.findViewById(R.id.vSeparatorBody); vSeparatorBody = vsBody.findViewById(R.id.vSeparatorBody);
@ -505,8 +505,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
ibNotifyContact.setOnClickListener(this); ibNotifyContact.setOnClickListener(this);
ibAddContact.setOnClickListener(this); ibAddContact.setOnClickListener(this);
btnDownloadAttachments.setOnClickListener(this);
btnSaveAttachments.setOnClickListener(this); btnSaveAttachments.setOnClickListener(this);
btnDownloadAttachments.setOnClickListener(this);
ibExpander.setOnClickListener(this); ibExpander.setOnClickListener(this);
ibFull.setOnClickListener(this); ibFull.setOnClickListener(this);
@ -543,8 +543,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
ibNotifyContact.setOnClickListener(null); ibNotifyContact.setOnClickListener(null);
ibAddContact.setOnClickListener(null); ibAddContact.setOnClickListener(null);
btnDownloadAttachments.setOnClickListener(null);
btnSaveAttachments.setOnClickListener(null); btnSaveAttachments.setOnClickListener(null);
btnDownloadAttachments.setOnClickListener(null);
ibExpander.setOnClickListener(null); ibExpander.setOnClickListener(null);
ibFull.setOnClickListener(null); ibFull.setOnClickListener(null);
@ -891,8 +891,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
pbCalendarWait.setVisibility(View.GONE); pbCalendarWait.setVisibility(View.GONE);
cbInline.setVisibility(View.GONE); cbInline.setVisibility(View.GONE);
btnDownloadAttachments.setVisibility(View.GONE);
btnSaveAttachments.setVisibility(View.GONE); btnSaveAttachments.setVisibility(View.GONE);
btnDownloadAttachments.setVisibility(View.GONE);
tvNoInternetAttachments.setVisibility(View.GONE); tvNoInternetAttachments.setVisibility(View.GONE);
vSeparatorBody.setVisibility(View.GONE); vSeparatorBody.setVisibility(View.GONE);
@ -1221,8 +1221,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
cbInline.setChecked(show_inline); cbInline.setChecked(show_inline);
cbInline.setVisibility(has_inline ? View.VISIBLE : View.GONE); cbInline.setVisibility(has_inline ? View.VISIBLE : View.GONE);
btnDownloadAttachments.setVisibility(download && suitable ? View.VISIBLE : View.GONE);
btnSaveAttachments.setVisibility(save ? View.VISIBLE : View.GONE); btnSaveAttachments.setVisibility(save ? View.VISIBLE : View.GONE);
btnDownloadAttachments.setVisibility(download && suitable ? View.VISIBLE : View.GONE);
tvNoInternetAttachments.setVisibility(downloading && !suitable ? View.VISIBLE : View.GONE); tvNoInternetAttachments.setVisibility(downloading && !suitable ? View.VISIBLE : View.GONE);
ibDecrypt.setVisibility(is_encrypted ? View.VISIBLE : View.GONE); ibDecrypt.setVisibility(is_encrypted ? View.VISIBLE : View.GONE);
@ -1466,12 +1466,13 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
case R.id.ivExpanderAddress: case R.id.ivExpanderAddress:
onToggleAddresses(message); onToggleAddresses(message);
break; break;
case R.id.btnDownloadAttachments:
onDownloadAttachments(message);
break;
case R.id.btnSaveAttachments: case R.id.btnSaveAttachments:
onSaveAttachments(message); onSaveAttachments(message);
break; break;
case R.id.btnDownloadAttachments:
onDownloadAttachments(message);
break;
case R.id.ibExpander: case R.id.ibExpander:
onToggleToolbar(message); onToggleToolbar(message);

@ -35,25 +35,25 @@
app:layout_constraintTop_toBottomOf="@+id/rvAttachment" /> app:layout_constraintTop_toBottomOf="@+id/rvAttachment" />
<Button <Button
android:id="@+id/btnDownloadAttachments" android:id="@+id/btnSaveAttachments"
style="?android:attr/buttonStyleSmall" style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:minWidth="0dp" android:minWidth="0dp"
android:minHeight="0dp" android:minHeight="0dp"
android:text="@string/title_download_all" android:text="@string/title_save_all"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbInline" /> app:layout_constraintTop_toBottomOf="@id/cbInline" />
<Button <Button
android:id="@+id/btnSaveAttachments" android:id="@+id/btnDownloadAttachments"
style="?android:attr/buttonStyleSmall" style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:minWidth="0dp" android:minWidth="0dp"
android:minHeight="0dp" android:minHeight="0dp"
android:text="@string/title_save_all" android:text="@string/title_download_all"
app:layout_constraintEnd_toEndOf="@id/rvAttachment" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbInline" /> app:layout_constraintTop_toBottomOf="@id/cbInline" />
<androidx.constraintlayout.widget.Barrier <androidx.constraintlayout.widget.Barrier

Loading…
Cancel
Save