Some promotion

This commit is contained in:
M66B
2019-07-12 21:20:06 +02:00
parent 0b8655f9a1
commit 93ea791bad
3 changed files with 14 additions and 1 deletions

View File

@@ -31,6 +31,7 @@ import android.os.Bundle;
import android.os.Handler;
import android.text.Editable;
import android.text.SpannableStringBuilder;
import android.text.Spanned;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.text.method.LinkMovementMethod;
@@ -848,6 +849,11 @@ public class FragmentIdentity extends FragmentBase {
etDisplay.setText(identity == null ? null : identity.display);
String signature = (identity == null ? null : identity.signature);
if (TextUtils.isEmpty(signature)) {
CharSequence promote = getText(R.string.app_promote);
if (promote instanceof Spanned)
signature = HtmlHelper.toHtml((Spanned) promote);
}
etSignature.setText(TextUtils.isEmpty(signature) ? null : HtmlHelper.fromHtml(signature));
etSignature.setTag(signature);

View File

@@ -27,6 +27,7 @@ import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.text.Spanned;
import android.text.TextUtils;
import android.text.method.LinkMovementMethod;
import android.util.Patterns;
@@ -348,7 +349,12 @@ public class FragmentQuickSetup extends FragmentBase {
identity.display = null;
identity.color = null;
identity.signature = null;
CharSequence promote = getText(R.string.app_promote);
if (promote instanceof Spanned)
identity.signature = HtmlHelper.toHtml((Spanned) promote);
else
identity.signature = null;
identity.auth_type = ConnectionHelper.AUTH_TYPE_PASSWORD;
identity.host = provider.smtp_host;