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

Commit d8be90e6 authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊 Committed by Nishith Khanna
Browse files

mail: Update about to match old mail

parent c0c9c3c4
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -12,6 +12,8 @@ import android.view.ViewGroup
import android.widget.Toast
import androidx.fragment.app.Fragment
import androidx.navigation.fragment.findNavController
import androidx.preference.Preference
import androidx.preference.PreferenceFragmentCompat
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import app.k9mail.core.common.provider.AppNameProvider
@@ -20,10 +22,10 @@ import com.google.android.material.textview.MaterialTextView
import org.koin.android.ext.android.inject
import timber.log.Timber

class AboutFragment : Fragment() {
class AboutFragment : PreferenceFragmentCompat() {
    private val appNameProvider: AppNameProvider by inject()

    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
    /*override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
        return inflater.inflate(R.layout.fragment_about, container, false)
    }

@@ -72,12 +74,18 @@ class AboutFragment : Fragment() {
            isNestedScrollingEnabled = false
            isFocusable = false
        }
    }
    }*/

    private fun displayChangeLog() {
        findNavController().navigate(R.id.action_aboutScreen_to_changelogScreen)
    }

    override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
        addPreferencesFromResource(R.xml.about_preferences)
        val versionPreference: Preference? = findPreference("build_version")
        versionPreference?.summary = getVersionNumber()
    }

    private fun getVersionNumber(): String? {
        return try {
            val context = requireContext()
+10 −0
Original line number Diff line number Diff line
@@ -2,4 +2,14 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
    <!-- Default signature -->
    <string name="default_signature">-- \nSent from /e/ Mail.</string>

    <string name="preferences_authors">Authors</string>
    <string name="preferences_app_info_title">Mail information</string>
    <string name="about_version_title">Build Version</string>
    <string name="about_license_tab_title">License</string>
    <string name="about_source_title">Source Code</string>
    <string name="preferences_app_info">Mail is an open-source email client for Android.</string>
    <string name="preferences_about_app">Mail is forked from k9 Mail</string>
    <string name="preferences_privacy_policy">Privacy policy</string>
    <string name="preferences_service_terms">Terms of service</string>
</resources>
+53 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
    <Preference
        android:key="notes_info"
        android:summary="@string/preferences_app_info"
        android:title="@string/preferences_app_info_title" />

    <Preference
        android:key="build_version"
        android:title="@string/about_version_title">
        <intent
            android:action="android.intent.action.VIEW"
            android:data="https://gitlab.e.foundation/e/os/mail/-/releases" />
    </Preference>

    <Preference
        android:key="about_app"
        android:title="@string/preferences_about_app">
        <intent
            android:action="android.intent.action.VIEW"
            android:data="https://github.com/thunderbird/thunderbird-android" />
    </Preference>

    <Preference android:title="@string/about_license_tab_title">
        <intent
            android:action="android.intent.action.VIEW"
            android:data="https://gitlab.e.foundation/e/apps/Mail/-/blob/master/LICENSE" />
    </Preference>

    <Preference android:title="@string/preferences_authors">
        <intent
            android:action="android.intent.action.VIEW"
            android:data="https://gitlab.e.foundation/e/os/mail/-/blob/master/AUTHORS" />
    </Preference>

    <Preference android:title="@string/about_source_title">
        <intent
            android:action="android.intent.action.VIEW"
            android:data="https://gitlab.e.foundation/e/os/mail" />
    </Preference>

    <Preference android:title="@string/preferences_privacy_policy">
        <intent
            android:action="android.intent.action.VIEW"
            android:data="https://e.foundation/legal-notice-privacy/" />
    </Preference>

    <Preference android:title="@string/preferences_service_terms">
        <intent
            android:action="android.intent.action.VIEW"
            android:data="https://e.foundation/legal-notice-privacy/" />
    </Preference>
</PreferenceScreen>