Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c069148f authored by narinder Rana's avatar narinder Rana
Browse files

Merge branch '108-about-page' into 'main'

108 about page

See merge request !53
parents 22f40cd1 9d1b9872
Loading
Loading
Loading
Loading
Loading
+4 −24
Original line number Diff line number Diff line
@@ -141,25 +141,17 @@ class Navigator @Inject constructor(
        startActivity(intent)
    }

    fun showDeveloper() {
        val intent = Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/moezbhatti"))
        startActivityExternal(intent)
    fun openUri(uri: Uri) {
        val intent = Intent(Intent.ACTION_VIEW, uri)
        startActivity(intent)
    }

    fun showSourceCode() {
        val intent = Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/moezbhatti/qksms"))
        startActivityExternal(intent)
    }

    fun showChangelog() {
        val intent = Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/moezbhatti/qksms/releases"))
        startActivityExternal(intent)
    }

    fun showLicense() {
        val intent = Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/moezbhatti/qksms/blob/master/LICENSE"))
        startActivityExternal(intent)
    }

    fun showBlockedConversations() {
        val intent = Intent(context, BlockingActivity::class.java)
@@ -177,19 +169,7 @@ class Navigator @Inject constructor(
        startActivityExternal(intent)
    }

    fun showRating() {
        val intent = Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=com.moez.QKSMS"))
                .addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY
                        or Intent.FLAG_ACTIVITY_NEW_DOCUMENT
                        or Intent.FLAG_ACTIVITY_MULTIPLE_TASK)

        try {
            startActivityExternal(intent)
        } catch (e: ActivityNotFoundException) {
            val url = "http://play.google.com/store/apps/details?id=com.moez.QKSMS"
            startActivityExternal(Intent(Intent.ACTION_VIEW, Uri.parse(url)))
        }
    }

    /**
     * Launch the Play Store and display the Call Blocker listing
+4 −3
Original line number Diff line number Diff line
@@ -31,7 +31,8 @@ import javax.inject.Inject

class AboutController : QkController<AboutView, Unit, AboutPresenter>(), AboutView {

    @Inject override lateinit var presenter: AboutPresenter
    @Inject
    override lateinit var presenter: AboutPresenter

    init {
        appComponent.inject(this)
@@ -39,7 +40,7 @@ class AboutController : QkController<AboutView, Unit, AboutPresenter>(), AboutVi
    }

    override fun onViewCreated() {
        version.summary = BuildConfig.VERSION_NAME
        app_version.summary = BuildConfig.VERSION_NAME
    }

    override fun onAttach(view: View) {
+11 −10
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
 */
package com.moez.QKSMS.feature.settings.about

import android.net.Uri
import com.moez.QKSMS.R
import com.moez.QKSMS.common.Navigator
import com.moez.QKSMS.common.base.QkPresenter
@@ -32,19 +33,19 @@ class AboutPresenter @Inject constructor(
    override fun bindIntents(view: AboutView) {
        super.bindIntents(view)


        view.preferenceClicks()
                .autoDisposable(view.scope())
                .subscribe { preference ->
                    when (preference.id) {
                        R.id.developer -> navigator.showDeveloper()

                        R.id.source -> navigator.showSourceCode()

                        R.id.changelog -> navigator.showChangelog()

                        R.id.contact -> navigator.showSupport()

                        R.id.license -> navigator.showLicense()
                        R.id.fork -> navigator.openUri(Uri.parse("https://github.com/moezbhatti/qksms"))
                        R.id.source -> navigator.openUri(Uri.parse("https://gitlab.e.foundation/e/apps/message"))
                        R.id.copyright -> navigator.openUri(Uri.parse("https://gitlab.e.foundation/e/apps/Message/-/blob/master/AUTHORS"))
                        R.id.license -> navigator.openUri(Uri.parse("https://gitlab.e.foundation/e/apps/Message/-/blob/master/LICENSE"))
                        R.id.author -> navigator.openUri(Uri.parse("https://gitlab.e.foundation/e/apps/Message/-/blob/master/AUTHORS"))
                        R.id.privacy -> navigator.openUri(Uri.parse("https://e.foundation/legal-notice-privacy/"))
                        R.id.service_terms -> navigator.openUri(Uri.parse("https://e.foundation/legal-notice-privacy/"))
                        R.id.app_version -> navigator.openUri(Uri.parse("https://gitlab.e.foundation/e/apps/Message/-/releases"))
                    }
                }
    }
+32 −22
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
<?xml version="1.0" encoding="utf-8"?><!--
  ~ Copyright (C) 2019 Moez Bhatti <moez.bhatti@gmail.com>
  ~
  ~ This file is part of QKSMS.
@@ -19,7 +18,6 @@
  -->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="?android:attr/windowBackground">
@@ -34,46 +32,58 @@
        android:paddingBottom="8dp">

        <com.moez.QKSMS.common.widget.PreferenceView
            android:id="@+id/version"
            android:id="@+id/app_info"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:title="@string/about_version_title"
            tools:summary="3.0.8" />
            app:summary="@string/app_info"
            app:title="@string/app_info_title" />

        <com.moez.QKSMS.common.widget.PreferenceView
            android:id="@+id/developer"
            android:id="@+id/app_version"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:summary="@string/about_developer"
            app:title="@string/about_developer_title" />
            app:title="@string/app_version_title" />


        <com.moez.QKSMS.common.widget.PreferenceView
            android:id="@+id/source"
            android:id="@+id/fork"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:summary="@string/about_source"
            app:title="@string/about_source_title" />
            app:title="@string/about_fork_title" />

        <com.moez.QKSMS.common.widget.PreferenceView
            android:id="@+id/changelog"
            android:id="@+id/license"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:summary="@string/about_changelog"
            app:title="@string/about_changelog_title" />
            app:summary="@string/about_license"
            app:title="@string/about_license_title" />

        <com.moez.QKSMS.common.widget.PreferenceView
            android:id="@+id/contact"
            android:id="@+id/author"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:summary="@string/about_contact"
            app:title="@string/about_contact_title" />
            app:summary="@string/about_author"
            app:title="@string/about_author_title" />

        <com.moez.QKSMS.common.widget.PreferenceView
            android:id="@+id/license"
            android:id="@+id/source"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:summary="@string/about_license"
            app:title="@string/about_license_title" />
            app:summary="@string/about_source"
            app:title="@string/about_source_title" />


        <com.moez.QKSMS.common.widget.PreferenceView
            android:id="@+id/privacy"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:title="@string/about_privacy_title" />

        <com.moez.QKSMS.common.widget.PreferenceView
            android:id="@+id/service_terms"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:title="@string/about_terms_title" />

        <com.moez.QKSMS.common.widget.PreferenceView
            android:id="@+id/copyright"