mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-29 13:53:54 +01:00
Rate Us method added to Utils.java and called on AboutActivity.java
This commit is contained in:
parent
4432f2ca1a
commit
fc8b522ac4
11 changed files with 30 additions and 18 deletions
|
|
@ -23,6 +23,7 @@ import fr.free.nrw.commons.AboutActivity;
|
|||
import fr.free.nrw.commons.BuildConfig;
|
||||
import fr.free.nrw.commons.CommonsApplication;
|
||||
import fr.free.nrw.commons.R;
|
||||
import fr.free.nrw.commons.Utils;
|
||||
import fr.free.nrw.commons.WelcomeActivity;
|
||||
import fr.free.nrw.commons.auth.AccountUtil;
|
||||
import fr.free.nrw.commons.auth.LoginActivity;
|
||||
|
|
@ -133,17 +134,6 @@ public abstract class NavigationBaseActivity extends BaseActivity
|
|||
Toast.makeText(this, R.string.no_email_client, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
return true;
|
||||
case R.id.action_rate:
|
||||
drawerLayout.closeDrawer(navigationView);
|
||||
final String appPackageName = getPackageName();
|
||||
Toast.makeText(this, appPackageName, Toast.LENGTH_SHORT).show();
|
||||
try {
|
||||
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + appPackageName)));
|
||||
}
|
||||
catch (android.content.ActivityNotFoundException anfe) {
|
||||
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=" + appPackageName)));
|
||||
}
|
||||
return true;
|
||||
case R.id.action_logout:
|
||||
new AlertDialog.Builder(this)
|
||||
.setMessage(R.string.logout_verification)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue