mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-29 13:53:54 +01:00
Inline app rating since its only ever used in 1 place
This commit is contained in:
parent
544e43a7ef
commit
c25b5b0533
2 changed files with 15 additions and 16 deletions
|
|
@ -1,8 +1,11 @@
|
|||
package fr.free.nrw.commons
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.ActivityNotFoundException
|
||||
import android.content.Intent
|
||||
import android.content.Intent.ACTION_VIEW
|
||||
import android.net.Uri
|
||||
import android.net.Uri.parse
|
||||
import android.os.Bundle
|
||||
import android.view.Menu
|
||||
import android.view.MenuItem
|
||||
|
|
@ -16,7 +19,9 @@ import fr.free.nrw.commons.theme.BaseActivity
|
|||
import fr.free.nrw.commons.utils.ConfigUtils.getVersionNameWithSha
|
||||
import fr.free.nrw.commons.utils.DialogUtil.showAlertDialog
|
||||
import fr.free.nrw.commons.utils.Utils
|
||||
import fr.free.nrw.commons.utils.Utils.handleWebUrl
|
||||
import java.util.Collections
|
||||
import androidx.core.net.toUri
|
||||
|
||||
/**
|
||||
* Represents about screen of this app
|
||||
|
|
@ -131,7 +136,16 @@ class AboutActivity : BaseActivity() {
|
|||
}
|
||||
|
||||
fun launchRatings(view: View?) {
|
||||
Utils.rateApp(this)
|
||||
try {
|
||||
startActivity(
|
||||
Intent(
|
||||
ACTION_VIEW,
|
||||
(Urls.PLAY_STORE_PREFIX + packageName).toUri()
|
||||
)
|
||||
)
|
||||
} catch (_: ActivityNotFoundException) {
|
||||
handleWebUrl(this, (Urls.PLAY_STORE_URL_PREFIX + packageName).toUri())
|
||||
}
|
||||
}
|
||||
|
||||
fun launchCredits(view: View?) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue