mirror of https://github.com/M66B/FairEmail.git
Merge branch 'master' of github.com:M66B/FairEmail
This commit is contained in:
commit
8dd3927455
2
FAQ.md
2
FAQ.md
|
@ -1004,7 +1004,7 @@ Possible causes are:
|
||||||
* A firewall or router is blocking connections to the server
|
* A firewall or router is blocking connections to the server
|
||||||
* The host name or port number is invalid
|
* The host name or port number is invalid
|
||||||
* The are problems with the internet connection
|
* The are problems with the internet connection
|
||||||
* The email server is refusing to accept connections
|
* The email server is refusing to accept (external) connections
|
||||||
* The email server is refusing to accept a message, for example because it is too large or contains unacceptable links
|
* The email server is refusing to accept a message, for example because it is too large or contains unacceptable links
|
||||||
* There are too many connections to the server, see also the next question
|
* There are too many connections to the server, see also the next question
|
||||||
|
|
||||||
|
|
|
@ -366,7 +366,7 @@ dependencies {
|
||||||
|
|
||||||
// https://github.com/bugsnag/bugsnag-android
|
// https://github.com/bugsnag/bugsnag-android
|
||||||
implementation("com.bugsnag:bugsnag-android:$bugsnag_version") {
|
implementation("com.bugsnag:bugsnag-android:$bugsnag_version") {
|
||||||
exclude group: "com.bugsnag", module: "bugsnag-plugin-android-anr"
|
//exclude group: "com.bugsnag", module: "bugsnag-plugin-android-anr"
|
||||||
exclude group: "com.bugsnag", module: "bugsnag-plugin-android-ndk"
|
exclude group: "com.bugsnag", module: "bugsnag-plugin-android-ndk"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3507,7 +3507,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
boolean current = properties.getValue(full ? "full" : "images", message.id);
|
boolean current = properties.getValue(full ? "full" : "images", message.id);
|
||||||
boolean asked = properties.getValue(full ? "full_asked" : "images_asked", message.id);
|
boolean asked = properties.getValue(full ? "full_asked" : "images_asked", message.id);
|
||||||
if (current || asked) {
|
if (current || asked) {
|
||||||
if (current) {
|
if (current && message.from != null) {
|
||||||
SharedPreferences.Editor editor = prefs.edit();
|
SharedPreferences.Editor editor = prefs.edit();
|
||||||
for (Address sender : message.from) {
|
for (Address sender : message.from) {
|
||||||
String from = ((InternetAddress) sender).getAddress();
|
String from = ((InternetAddress) sender).getAddress();
|
||||||
|
|
|
@ -298,7 +298,8 @@ public class EntityMessage implements Serializable {
|
||||||
Element strong = document.createElement("strong");
|
Element strong = document.createElement("strong");
|
||||||
strong.text(Helper.getString(context, l, R.string.title_received) + " ");
|
strong.text(Helper.getString(context, l, R.string.title_received) + " ");
|
||||||
p.appendChild(strong);
|
p.appendChild(strong);
|
||||||
p.appendText(DF.format(received));
|
if (received != null) // embedded messages
|
||||||
|
p.appendText(DF.format(received));
|
||||||
p.appendElement("br");
|
p.appendElement("br");
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,6 +19,7 @@ package eu.faircode.email;
|
||||||
Copyright 2018-2020 by Marcel Bokhorst (M66B)
|
Copyright 2018-2020 by Marcel Bokhorst (M66B)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import android.graphics.Paint;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
@ -44,10 +45,19 @@ public class FragmentAbout extends FragmentBase {
|
||||||
|
|
||||||
TextView tvVersion = view.findViewById(R.id.tvVersion);
|
TextView tvVersion = view.findViewById(R.id.tvVersion);
|
||||||
TextView tvRelease = view.findViewById(R.id.tvRelease);
|
TextView tvRelease = view.findViewById(R.id.tvRelease);
|
||||||
|
TextView tvGplV3 = view.findViewById(R.id.tvGplV3);
|
||||||
|
|
||||||
tvVersion.setText(getString(R.string.title_version, BuildConfig.VERSION_NAME));
|
tvVersion.setText(getString(R.string.title_version, BuildConfig.VERSION_NAME));
|
||||||
tvRelease.setText(BuildConfig.RELEASE_NAME);
|
tvRelease.setText(BuildConfig.RELEASE_NAME);
|
||||||
|
|
||||||
|
tvGplV3.setPaintFlags(tvGplV3.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);
|
||||||
|
tvGplV3.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
Helper.view(getContext(), Uri.parse(Helper.LICENSE_URI), true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,11 +20,14 @@ package eu.faircode.email;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
|
import android.graphics.Paint;
|
||||||
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
@ -38,6 +41,15 @@ public class FragmentEula extends FragmentBase {
|
||||||
|
|
||||||
View view = inflater.inflate(R.layout.fragment_eula, container, false);
|
View view = inflater.inflate(R.layout.fragment_eula, container, false);
|
||||||
|
|
||||||
|
TextView tvGplV3 = view.findViewById(R.id.tvGplV3);
|
||||||
|
tvGplV3.setPaintFlags(tvGplV3.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);
|
||||||
|
tvGplV3.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
Helper.view(getContext(), Uri.parse(Helper.LICENSE_URI), true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
Button btnAgree = view.findViewById(R.id.btnOk);
|
Button btnAgree = view.findViewById(R.id.btnOk);
|
||||||
Button btnDisagree = view.findViewById(R.id.btnCancel);
|
Button btnDisagree = view.findViewById(R.id.btnCancel);
|
||||||
|
|
||||||
|
|
|
@ -7554,15 +7554,27 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
||||||
tvSourceFolders.setText(getDisplay(result, false));
|
tvSourceFolders.setText(getDisplay(result, false));
|
||||||
tvTargetFolders.setText(getDisplay(result, true));
|
tvTargetFolders.setText(getDisplay(result, true));
|
||||||
|
|
||||||
|
List<String> sources = new ArrayList<>();
|
||||||
|
List<String> targets = new ArrayList<>();
|
||||||
|
for (MessageTarget t : result) {
|
||||||
|
if (!sources.contains(t.sourceFolder.type))
|
||||||
|
sources.add(t.sourceFolder.type);
|
||||||
|
if (!targets.contains(t.targetFolder.type))
|
||||||
|
targets.add(t.targetFolder.type);
|
||||||
|
}
|
||||||
|
|
||||||
Drawable source = null;
|
Drawable source = null;
|
||||||
Drawable target = null;
|
if (sources.size() == 1) {
|
||||||
if (result.size() == 1) {
|
source = getResources().getDrawable(EntityFolder.getIcon(sources.get(0)), null);
|
||||||
source = getResources().getDrawable(EntityFolder.getIcon(result.get(0).sourceFolder.type), null);
|
|
||||||
target = getResources().getDrawable(EntityFolder.getIcon(result.get(0).targetFolder.type), null);
|
|
||||||
if (source != null)
|
if (source != null)
|
||||||
source.setBounds(0, 0, source.getIntrinsicWidth(), source.getIntrinsicHeight());
|
source.setBounds(0, 0, source.getIntrinsicWidth(), source.getIntrinsicHeight());
|
||||||
|
}
|
||||||
|
|
||||||
|
Drawable target = null;
|
||||||
|
if (targets.size() == 1) {
|
||||||
|
target = getResources().getDrawable(EntityFolder.getIcon(targets.get(0)), null);
|
||||||
if (target != null)
|
if (target != null)
|
||||||
target.setBounds(0, 0, target.getIntrinsicWidth(), source.getIntrinsicHeight());
|
target.setBounds(0, 0, target.getIntrinsicWidth(), target.getIntrinsicHeight());
|
||||||
}
|
}
|
||||||
|
|
||||||
tvSourceFolders.setCompoundDrawablesRelative(source, null, null, null);
|
tvSourceFolders.setCompoundDrawablesRelative(source, null, null, null);
|
||||||
|
|
|
@ -318,18 +318,22 @@ public class FragmentQuickSetup extends FragmentBase {
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (Throwable ex) {
|
} catch (Throwable ex) {
|
||||||
// Why not AuthenticationFailedException?
|
// Why not AuthenticationFailedException?
|
||||||
// Some providers refuse connection with an invalid username
|
// Some providers terminate the connection with an invalid username
|
||||||
if (!user.equals(username)) {
|
if (user.equals(username))
|
||||||
Log.w(ex);
|
|
||||||
user = username;
|
|
||||||
Log.i("Retry with user=" + user);
|
|
||||||
iservice.connect(
|
|
||||||
provider.imap.host, provider.imap.port,
|
|
||||||
EmailService.AUTH_TYPE_PASSWORD, null,
|
|
||||||
user, password,
|
|
||||||
null, null);
|
|
||||||
} else
|
|
||||||
throw ex;
|
throw ex;
|
||||||
|
else
|
||||||
|
try {
|
||||||
|
user = username;
|
||||||
|
Log.i("Retry with user=" + user);
|
||||||
|
iservice.connect(
|
||||||
|
provider.imap.host, provider.imap.port,
|
||||||
|
EmailService.AUTH_TYPE_PASSWORD, null,
|
||||||
|
user, password,
|
||||||
|
null, null);
|
||||||
|
} catch (Throwable ex1) {
|
||||||
|
Log.w(ex1);
|
||||||
|
throw ex;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
folders = iservice.getFolders();
|
folders = iservice.getFolders();
|
||||||
|
|
|
@ -155,6 +155,7 @@ public class Helper {
|
||||||
static final String TEST_URI = "https://play.google.com/apps/testing/" + BuildConfig.APPLICATION_ID;
|
static final String TEST_URI = "https://play.google.com/apps/testing/" + BuildConfig.APPLICATION_ID;
|
||||||
static final String CROWDIN_URI = "https://crowdin.com/project/open-source-email";
|
static final String CROWDIN_URI = "https://crowdin.com/project/open-source-email";
|
||||||
static final String GRAVATAR_PRIVACY_URI = "https://meta.stackexchange.com/questions/44717/is-gravatar-a-privacy-risk";
|
static final String GRAVATAR_PRIVACY_URI = "https://meta.stackexchange.com/questions/44717/is-gravatar-a-privacy-risk";
|
||||||
|
static final String LICENSE_URI = "https://www.gnu.org/licenses/gpl-3.0.html";
|
||||||
|
|
||||||
static final Pattern EMAIL_ADDRESS
|
static final Pattern EMAIL_ADDRESS
|
||||||
= Pattern.compile(
|
= Pattern.compile(
|
||||||
|
|
|
@ -283,7 +283,7 @@ public class Log {
|
||||||
config.setAutoTrackSessions(false);
|
config.setAutoTrackSessions(false);
|
||||||
|
|
||||||
ErrorTypes etypes = new ErrorTypes();
|
ErrorTypes etypes = new ErrorTypes();
|
||||||
etypes.setAnrs(false);
|
etypes.setAnrs(BuildConfig.DEBUG);
|
||||||
etypes.setNdkCrashes(false);
|
etypes.setNdkCrashes(false);
|
||||||
config.setEnabledErrorTypes(etypes);
|
config.setEnabledErrorTypes(etypes);
|
||||||
|
|
||||||
|
|
|
@ -579,6 +579,8 @@ public class ServiceUI extends IntentService {
|
||||||
long now = new Date().getTime();
|
long now = new Date().getTime();
|
||||||
long interval = pollInterval * 60 * 1000L;
|
long interval = pollInterval * 60 * 1000L;
|
||||||
long next = now + interval - now % interval + 30 * 1000L;
|
long next = now + interval - now % interval + 30 * 1000L;
|
||||||
|
if (next < now + interval / 5)
|
||||||
|
next += interval;
|
||||||
|
|
||||||
EntityLog.log(context, "Poll next=" + new Date(next));
|
EntityLog.log(context, "Poll next=" + new Date(next));
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
android:id="@+id/tvMessages"
|
android:id="@+id/tvMessages"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
android:text="Messages"
|
android:text="Messages"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Large"
|
android:textAppearance="@style/TextAppearance.AppCompat.Large"
|
||||||
android:textColor="?android:attr/textColorPrimary"
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
|
@ -28,6 +29,7 @@
|
||||||
android:layout_marginTop="24dp"
|
android:layout_marginTop="24dp"
|
||||||
android:drawableStart="@drawable/baseline_inbox_24"
|
android:drawableStart="@drawable/baseline_inbox_24"
|
||||||
android:drawablePadding="6dp"
|
android:drawablePadding="6dp"
|
||||||
|
android:gravity="center"
|
||||||
android:text="Source folders"
|
android:text="Source folders"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||||
android:textColor="?android:attr/textColorPrimary"
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
|
@ -40,6 +42,7 @@
|
||||||
android:layout_width="48dp"
|
android:layout_width="48dp"
|
||||||
android:layout_height="48dp"
|
android:layout_height="48dp"
|
||||||
android:layout_marginTop="12dp"
|
android:layout_marginTop="12dp"
|
||||||
|
android:gravity="center"
|
||||||
android:tint="?android:attr/textColorSecondary"
|
android:tint="?android:attr/textColorSecondary"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
@ -53,6 +56,7 @@
|
||||||
android:layout_marginTop="12dp"
|
android:layout_marginTop="12dp"
|
||||||
android:drawableStart="@drawable/baseline_archive_24"
|
android:drawableStart="@drawable/baseline_archive_24"
|
||||||
android:drawablePadding="6dp"
|
android:drawablePadding="6dp"
|
||||||
|
android:gravity="center"
|
||||||
android:text="Target folders"
|
android:text="Target folders"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||||
android:textColor="?android:attr/textColorPrimary"
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
|
@ -65,6 +69,7 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="24dp"
|
android:layout_marginTop="24dp"
|
||||||
|
android:gravity="center"
|
||||||
android:text="@string/title_no_ask_again"
|
android:text="@string/title_no_ask_again"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
android:layout_marginTop="12dp"
|
android:layout_marginTop="12dp"
|
||||||
android:text="@string/app_eula"
|
android:text="@string/app_eula"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||||
|
android:textIsSelectable="true"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tvEulaTitle" />
|
app:layout_constraintTop_toBottomOf="@id/tvEulaTitle" />
|
||||||
|
|
||||||
|
@ -53,7 +54,7 @@
|
||||||
android:layout_marginTop="12dp"
|
android:layout_marginTop="12dp"
|
||||||
android:text="@string/title_gplv3"
|
android:text="@string/title_gplv3"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||||
android:textStyle="italic"
|
android:textColor="?android:attr/textColorLink"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tvEula" />
|
app:layout_constraintTop_toBottomOf="@id/tvEula" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
Loading…
Reference in New Issue