Link to changelog

pull/155/head
M66B 5 years ago
parent edd686e636
commit 39fdabfa9c

@ -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", "\"\""
}
}

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

@ -27,6 +27,18 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvVersion" />
<Button
android:id="@+id/btnChangelog"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:minWidth="0dp"
android:minHeight="0dp"
android:text="@string/app_changelog"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tvCopyright" />
<include
android:id="@+id/inEula"
layout="@layout/include_eula"
@ -34,6 +46,6 @@
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvCopyright" />
app:layout_constraintTop_toBottomOf="@id/btnChangelog" />
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>

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

@ -1,6 +1,7 @@
<resources>
<string name="app_name" translatable="false">FairEmail</string>
<string name="app_copyright" translatable="false">Copyright &#x24B8; 20182019 by M. Bokhorst</string>
<string name="app_changelog">Changelog</string>
<string name="app_welcome">FairEmail 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.</string>
<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>

Loading…
Cancel
Save