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

Commit cb95fe83 authored by tibbi's avatar tibbi
Browse files

adding a helper function for launching Purchase Thank You intent

parent def9669a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ buildscript {
        propMinSdkVersion = 16
        propTargetSdkVersion = propCompileSdkVersion
        propVersionCode = 1
        propVersionName = '4.4.0'
        propVersionName = '4.4.1'
        kotlin_version = '1.2.51'
        support_libs = '27.1.1'
    }
+2 −2
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@ import android.support.v7.app.AlertDialog
import android.text.Html
import android.text.method.LinkMovementMethod
import com.simplemobiletools.commons.R
import com.simplemobiletools.commons.extensions.launchViewIntent
import com.simplemobiletools.commons.extensions.launchPurchaseThankYouIntent
import com.simplemobiletools.commons.extensions.setupDialogStuff
import kotlinx.android.synthetic.main.dialog_purchase_thank_you.view.*

@@ -17,7 +17,7 @@ class PurchaseThankYouDialog(val activity: Activity) {
        }

        AlertDialog.Builder(activity)
                .setPositiveButton(R.string.purchase, { dialog, which -> activity.launchViewIntent(R.string.thank_you_url) })
                .setPositiveButton(R.string.purchase) { dialog, which -> activity.launchPurchaseThankYouIntent() }
                .setNegativeButton(R.string.cancel, null)
                .create().apply {
                    activity.setupDialogStuff(view, this)
+2 −0
Original line number Diff line number Diff line
@@ -118,6 +118,8 @@ fun Activity.isShowingSAFDialog(path: String, treeUri: String, requestCode: Int)
    }
}

fun Activity.launchPurchaseThankYouIntent() = launchViewIntent(resources.getString(R.string.thank_you_url))

fun Activity.launchViewIntent(id: Int) = launchViewIntent(resources.getString(id))

fun Activity.launchViewIntent(url: String) {