diff --git a/app/build.gradle b/app/build.gradle
index b1d9fc176c..25c8e6057d 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -55,6 +55,7 @@ android {
buildConfigField "boolean", "PLAY_STORE_RELEASE", "false"
buildConfigField "String", "INVITE_URI", "\"https://email.faircode.eu/\""
buildConfigField "String", "PRO_FEATURES_URI", "\"https://email.faircode.eu/donate/\""
+ buildConfigField "String", "CHANGELOG", "\"https://github.com/M66B/open-source-email/releases/\""
buildConfigField "String", "GITHUB_LATEST_API", "\"https://api.github.com/repos/M66B/open-source-email/releases/latest\""
}
play_beta {
@@ -63,6 +64,7 @@ android {
buildConfigField "boolean", "PLAY_STORE_RELEASE", "true"
buildConfigField "String", "INVITE_URI", "\"https://play.google.com/apps/testing/eu.faircode.email\""
buildConfigField "String", "PRO_FEATURES_URI", "\"https://email.faircode.eu/#pro\""
+ buildConfigField "String", "CHANGELOG", "\"\""
buildConfigField "String", "GITHUB_LATEST_API", "\"\""
}
play_release {
@@ -71,6 +73,7 @@ android {
buildConfigField "boolean", "PLAY_STORE_RELEASE", "true"
buildConfigField "String", "INVITE_URI", "\"https://play.google.com/store/apps/details?id=eu.faircode.email\""
buildConfigField "String", "PRO_FEATURES_URI", "\"https://email.faircode.eu/#pro\""
+ buildConfigField "String", "CHANGELOG", "\"\""
buildConfigField "String", "GITHUB_LATEST_API", "\"\""
}
}
diff --git a/app/src/main/java/eu/faircode/email/FragmentAbout.java b/app/src/main/java/eu/faircode/email/FragmentAbout.java
index 133752d7b8..b8cbdbe8b9 100644
--- a/app/src/main/java/eu/faircode/email/FragmentAbout.java
+++ b/app/src/main/java/eu/faircode/email/FragmentAbout.java
@@ -19,32 +19,51 @@ package eu.faircode.email;
Copyright 2018-2019 by Marcel Bokhorst (M66B)
*/
+import android.content.Intent;
import android.graphics.Paint;
+import android.net.Uri;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
+import android.widget.Button;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
public class FragmentAbout extends FragmentBase {
- private TextView tvVersion;
-
@Override
@Nullable
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
setSubtitle(R.string.menu_about);
+ Intent changelog = null;
+ if (!Helper.isPlayStoreInstall(getContext())) {
+ changelog = new Intent(Intent.ACTION_VIEW);
+ changelog.setData(Uri.parse(BuildConfig.CHANGELOG));
+ if (changelog.resolveActivity(getContext().getPackageManager()) == null)
+ changelog = null;
+ }
+
View view = inflater.inflate(R.layout.fragment_about, container, false);
+ TextView tvVersion = view.findViewById(R.id.tvVersion);
+ Button btnChangelog = view.findViewById(R.id.btnChangelog);
TextView tvLimitations = view.findViewById(R.id.tvLimitations);
- tvVersion = view.findViewById(R.id.tvVersion);
tvVersion.setText(getString(R.string.title_version, BuildConfig.VERSION_NAME));
+ btnChangelog.setVisibility(changelog == null ? View.GONE : View.VISIBLE);
tvLimitations.setPaintFlags(tvLimitations.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);
+ final Intent intent = changelog;
+ btnChangelog.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ startActivity(intent);
+ }
+ });
+
return view;
}
}
diff --git a/app/src/main/res/layout/fragment_about.xml b/app/src/main/res/layout/fragment_about.xml
index 7fbbe251e6..95c318f77e 100644
--- a/app/src/main/res/layout/fragment_about.xml
+++ b/app/src/main/res/layout/fragment_about.xml
@@ -27,6 +27,18 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvVersion" />
+
+
+ app:layout_constraintTop_toBottomOf="@id/btnChangelog" />
\ No newline at end of file
diff --git a/app/src/main/res/layout/include_eula.xml b/app/src/main/res/layout/include_eula.xml
index bdbfde637d..a9ca544f9a 100644
--- a/app/src/main/res/layout/include_eula.xml
+++ b/app/src/main/res/layout/include_eula.xml
@@ -8,7 +8,6 @@
android:id="@+id/tvWelcome"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginTop="12dp"
android:text="@string/app_welcome"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
app:layout_constraintStart_toStartOf="parent"
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 9e77ee93c4..9dde76a1ea 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -1,6 +1,7 @@
FairEmailCopyright Ⓒ 2018–2019 by M. Bokhorst
+ ChangelogFairEmail is an open source email app focused on privacy and security. For this reason some features might work differently from what you are used to.For example, messages will always be reformatted to remove unsafe elements and to improve readability and opening links needs to be confirmed for safety.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.