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

Commit 9ddfbe00 authored by Amit Kumar's avatar Amit Kumar
Browse files

Following improvements and fixes

1. Remove Invite and Help section
2. Add /e/ specific about menu
3. Mark a few strings not translatable
parent 34262b4f
Loading
Loading
Loading
Loading
Loading
+10 −35
Original line number Diff line number Diff line
@@ -119,23 +119,23 @@ class Navigator @Inject constructor(
        startActivity(intent)
    }

    fun showDeveloper() {
        val intent = Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/moezbhatti"))
    fun showSourceCode() {
        val intent = Intent(Intent.ACTION_VIEW, Uri.parse("https://gitlab.e.foundation/e/apps/message"))
        startActivity(intent)
    }

    fun showSourceCode() {
        val intent = Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/moezbhatti/qksms"))
    fun showLicense() {
        val intent = Intent(Intent.ACTION_VIEW, Uri.parse("https://gitlab.e.foundation/e/apps/message/blob/e-features/LICENSE"))
        startActivity(intent)
    }

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

    fun showLicense() {
        val intent = Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/moezbhatti/qksms/blob/master/LICENSE"))
    fun showCopyright() {
        val intent = Intent(Intent.ACTION_VIEW, Uri.parse("https://gitlab.e.foundation/e/apps/message/blob/e-features/AUTHORS"))
        startActivity(intent)
    }

@@ -178,33 +178,6 @@ class Navigator @Inject constructor(
        startActivity(intent)
    }

    fun showSupport() {
        val intent = Intent(Intent.ACTION_SENDTO)
        intent.data = Uri.parse("mailto:")
        intent.putExtra(Intent.EXTRA_EMAIL, arrayOf("moez@qklabs.com"))
        intent.putExtra(Intent.EXTRA_SUBJECT, "QKSMS Support")
        intent.putExtra(Intent.EXTRA_TEXT, StringBuilder("\n\n")
                .append("\n\n--- Please write your message above this line ---\n\n")
                .append("Package: ${context.packageName}\n")
                .append("Version: ${BuildConfig.VERSION_NAME}\n")
                .append("Device: ${Build.BRAND} ${Build.MODEL}\n")
                .append("SDK: ${Build.VERSION.SDK_INT}\n")
                .append("Upgraded"
                        .takeIf { BuildConfig.FLAVOR != "noAnalytics" }
                        .takeIf { billingManager.upgradeStatus.blockingFirst() } ?: "")
                .toString())
        startActivityExternal(intent)
    }

    fun showInvite() {
        analyticsManager.track("Clicked Invite")
        Intent(Intent.ACTION_SEND)
                .setType("text/plain")
                .putExtra(Intent.EXTRA_TEXT, "http://qklabs.com/download")
                .let { Intent.createChooser(it, null) }
                .let(this::startActivityExternal)
    }

    fun addContact(address: String) {
        val uri = Uri.parse("tel: $address")
        var intent = Intent(ContactsContract.Intents.SHOW_OR_CREATE_CONTACT, uri)
@@ -245,4 +218,6 @@ class Navigator @Inject constructor(
        }
    }



}
 No newline at end of file
+1 −3
Original line number Diff line number Diff line
@@ -93,9 +93,7 @@ class MainActivity : QkThemedActivity(), MainView {
                backup.clicks().map { DrawerItem.BACKUP },
                scheduled.clicks().map { DrawerItem.SCHEDULED },
                blocking.clicks().map { DrawerItem.BLOCKING },
                settings.clicks().map { DrawerItem.SETTINGS },
                help.clicks().map { DrawerItem.HELP },
                invite.clicks().map { DrawerItem.INVITE }))
                settings.clicks().map { DrawerItem.SETTINGS }))
    }
    override val optionsItemIntent: Subject<Int> = PublishSubject.create()
    override val dismissRatingIntent by lazy { rateDismiss.clicks() }
+1 −1
Original line number Diff line number Diff line
@@ -47,4 +47,4 @@ interface MainView : QkView<MainState> {

}

enum class DrawerItem { INBOX, ARCHIVED, BACKUP, SCHEDULED, BLOCKING, SETTINGS, PLUS, HELP, INVITE }
 No newline at end of file
enum class DrawerItem { INBOX, ARCHIVED, BACKUP, SCHEDULED, BLOCKING, SETTINGS, PLUS }
 No newline at end of file
+0 −2
Original line number Diff line number Diff line
@@ -190,8 +190,6 @@ class MainViewModel @Inject constructor(
                .doOnNext { if (it == DrawerItem.SCHEDULED) navigator.showScheduled() }
                .doOnNext { if (it == DrawerItem.BLOCKING) navigator.showBlockedConversations() }
                .doOnNext { if (it == DrawerItem.SETTINGS) navigator.showSettings() }
                .doOnNext { if (it == DrawerItem.HELP) navigator.showSupport() }
                .doOnNext { if (it == DrawerItem.INVITE) navigator.showInvite() }
                .distinctUntilChanged()
                .doOnNext {
                    when (it) {
+0 −1
Original line number Diff line number Diff line
@@ -89,7 +89,6 @@ class SettingsController : QkController<SettingsView, SettingsState, SettingsPre
        sendDelayDialog.adapter.setData(R.array.delayed_sending_labels)
        mmsSizeDialog.adapter.setData(R.array.mms_sizes, R.array.mms_sizes_ids)

        about.summary = context.getString(R.string.settings_version, BuildConfig.VERSION_NAME)
    }

    override fun onAttach(view: View) {
Loading