mirror of https://github.com/M66B/FairEmail.git
Show message is downloading
This commit is contained in:
parent
ef890934e2
commit
076b97c955
2
FAQ.md
2
FAQ.md
|
@ -607,7 +607,7 @@ The message text will keep loading if there is no connection to the account, see
|
||||||
You can check the account and folder list for the account and folder state (see the legend for the meaning of the icons)
|
You can check the account and folder list for the account and folder state (see the legend for the meaning of the icons)
|
||||||
and the operation list accessible via the main navigation menu for pending operations (see [this FAQ](#user-content-faq3) for the meaning of the operations).
|
and the operation list accessible via the main navigation menu for pending operations (see [this FAQ](#user-content-faq3) for the meaning of the operations).
|
||||||
|
|
||||||
In the advanced settings you can set the maximum size for automatically downloading of messages on metered connections.
|
In the receive settings you can set the maximum size for automatically downloading of messages on metered connections.
|
||||||
|
|
||||||
Mobile connections are almost always metered and some (paid) Wi-Fi hotspots are too.
|
Mobile connections are almost always metered and some (paid) Wi-Fi hotspots are too.
|
||||||
|
|
||||||
|
|
|
@ -326,6 +326,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
private View wvBody;
|
private View wvBody;
|
||||||
private ContentLoadingProgressBar pbBody;
|
private ContentLoadingProgressBar pbBody;
|
||||||
private TextView tvNoInternetBody;
|
private TextView tvNoInternetBody;
|
||||||
|
private ImageButton ibDownloading;
|
||||||
|
private Group grpDownloading;
|
||||||
|
|
||||||
private TextView tvCalendarSummary;
|
private TextView tvCalendarSummary;
|
||||||
private TextView tvCalendarStart;
|
private TextView tvCalendarStart;
|
||||||
|
@ -482,6 +484,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
wvBody = vsBody.findViewById(R.id.wvBody);
|
wvBody = vsBody.findViewById(R.id.wvBody);
|
||||||
pbBody = vsBody.findViewById(R.id.pbBody);
|
pbBody = vsBody.findViewById(R.id.pbBody);
|
||||||
tvNoInternetBody = vsBody.findViewById(R.id.tvNoInternetBody);
|
tvNoInternetBody = vsBody.findViewById(R.id.tvNoInternetBody);
|
||||||
|
ibDownloading = vsBody.findViewById(R.id.ibDownloading);
|
||||||
|
grpDownloading = vsBody.findViewById(R.id.grpDownloading);
|
||||||
|
|
||||||
rvImage = vsBody.findViewById(R.id.rvImage);
|
rvImage = vsBody.findViewById(R.id.rvImage);
|
||||||
rvImage.setHasFixedSize(false);
|
rvImage.setHasFixedSize(false);
|
||||||
|
@ -549,6 +553,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
ibUnsubscribe.setOnClickListener(this);
|
ibUnsubscribe.setOnClickListener(this);
|
||||||
ibDecrypt.setOnClickListener(this);
|
ibDecrypt.setOnClickListener(this);
|
||||||
|
|
||||||
|
ibDownloading.setOnClickListener(this);
|
||||||
|
|
||||||
tvBody.setOnTouchListener(this);
|
tvBody.setOnTouchListener(this);
|
||||||
tvBody.addOnLayoutChangeListener(this);
|
tvBody.addOnLayoutChangeListener(this);
|
||||||
|
|
||||||
|
@ -602,6 +608,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
ibUnsubscribe.setOnClickListener(null);
|
ibUnsubscribe.setOnClickListener(null);
|
||||||
ibDecrypt.setOnClickListener(null);
|
ibDecrypt.setOnClickListener(null);
|
||||||
|
|
||||||
|
ibDownloading.setOnClickListener(null);
|
||||||
|
|
||||||
tvBody.setOnTouchListener(null);
|
tvBody.setOnTouchListener(null);
|
||||||
tvBody.removeOnLayoutChangeListener(this);
|
tvBody.removeOnLayoutChangeListener(this);
|
||||||
|
|
||||||
|
@ -960,6 +968,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
wvBody.setVisibility(View.GONE);
|
wvBody.setVisibility(View.GONE);
|
||||||
pbBody.setVisibility(View.GONE);
|
pbBody.setVisibility(View.GONE);
|
||||||
tvNoInternetBody.setVisibility(View.GONE);
|
tvNoInternetBody.setVisibility(View.GONE);
|
||||||
|
grpDownloading.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void bindFlagged(TupleMessageEx message, boolean expanded) {
|
private void bindFlagged(TupleMessageEx message, boolean expanded) {
|
||||||
|
@ -1229,6 +1238,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
|
|
||||||
private void bindBody(TupleMessageEx message) {
|
private void bindBody(TupleMessageEx message) {
|
||||||
tvBody.setText(null);
|
tvBody.setText(null);
|
||||||
|
grpDownloading.setVisibility(message.content ? View.GONE : View.VISIBLE);
|
||||||
|
|
||||||
if (!message.content)
|
if (!message.content)
|
||||||
return;
|
return;
|
||||||
|
@ -1982,6 +1992,10 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
onActionDecrypt(message);
|
onActionDecrypt(message);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case R.id.ibDownloading:
|
||||||
|
Helper.viewFAQ(context, 15);
|
||||||
|
break;
|
||||||
|
|
||||||
case R.id.btnCalendarAccept:
|
case R.id.btnCalendarAccept:
|
||||||
case R.id.btnCalendarDecline:
|
case R.id.btnCalendarDecline:
|
||||||
case R.id.btnCalendarMaybe:
|
case R.id.btnCalendarMaybe:
|
||||||
|
|
|
@ -51,6 +51,28 @@
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/inNavigation" />
|
app:layout_constraintTop_toBottomOf="@id/inNavigation" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvDownloading"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:text="@string/title_download_message"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tvNoInternetBody" />
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/ibDownloading"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@null"
|
||||||
|
android:contentDescription="@string/title_download_message"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/tvDownloading"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/tvDownloading"
|
||||||
|
app:srcCompat="@drawable/baseline_info_24" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvBody"
|
android:id="@+id/tvBody"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
@ -65,7 +87,7 @@
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tvNoInternetBody" />
|
app:layout_constraintTop_toBottomOf="@id/tvDownloading" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/wvBody"
|
android:id="@+id/wvBody"
|
||||||
|
@ -104,4 +126,10 @@
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/inAttachmentsAlt" />
|
app:layout_constraintTop_toBottomOf="@id/inAttachmentsAlt" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.Group
|
||||||
|
android:id="@+id/grpDownloading"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
app:constraint_referenced_ids="tvDownloading,ibDownloading" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
Loading…
Reference in New Issue