Some promotion

pull/158/head
M66B 5 years ago
parent 0b8655f9a1
commit 93ea791bad

@ -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);

@ -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;

@ -7,6 +7,7 @@
<string name="app_limitations">For example, messages will always be reformatted to remove unsafe elements and to improve readability and opening links needs to be confirmed for safety.</string>
<string name="app_eula" translatable="false">THIS SOFTWARE IS PROVIDED BY THE AUTHOR \'\'AS IS\'\' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</string>
<string name="app_crash">FairEmail is not supported on this device because bugs in Android cause crashes</string>
<string name="app_promote">Sent with <a href="https://email.faircode.eu/">FairEmail</a>, an open source, privacy friendly email app for Android</string>
<string name="app_exit">Go \'back\' again to exit</string>
<string name="channel_service">Service</string>

Loading…
Cancel
Save