Skip to content

Conversation

@ujjwalagrawal17
Copy link
Contributor

Description

Fixes #1187

  1. Added star icon in drawable and string in drawer.xml
  2. Redirect to google play store in NavigationBaseActivity using

final String appPackageName = getPackageName();
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)));
}

Screenshots showing what changed

screenshot_20180224-173748

@codecov-io
Copy link

codecov-io commented Feb 24, 2018

Codecov Report

Merging #1188 into master will decrease coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #1188      +/-   ##
=========================================
- Coverage    3.81%   3.81%   -0.01%     
=========================================
  Files         125     125              
  Lines        5812    5821       +9     
  Branches      568     568              
=========================================
  Hits          222     222              
- Misses       5575    5584       +9     
  Partials       15      15
Impacted Files Coverage Δ
...free/nrw/commons/theme/NavigationBaseActivity.java 22.72% <ø> (ø) ⬆️
...c/main/java/fr/free/nrw/commons/AboutActivity.java 0% <ø> (ø) ⬆️
app/src/main/java/fr/free/nrw/commons/Utils.java 26.31% <0%> (-3.1%) ⬇️
...fr/free/nrw/commons/media/MediaDetailFragment.java 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1db1715...6277272. Read the comment docs.

case R.id.action_rate:
drawerLayout.closeDrawer(navigationView);
final String appPackageName = getPackageName();
Toast.makeText(this, appPackageName, Toast.LENGTH_SHORT).show();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Toast not needed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was for testing, I will remove it.

drawerLayout.closeDrawer(navigationView);
final String appPackageName = getPackageName();
Toast.makeText(this, appPackageName, Toast.LENGTH_SHORT).show();
try {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest extracting the rate us option logic to a different class(probably Utils). Later on we can have this option plugged in at multiple locations.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I will add a method in Utils.java.

@maskaravivek
Copy link
Contributor

@ujjwalagrawal17 based on the discussion in #1187 can you make the changes and put the Rate us feature in the About page instead. :)

Sorry, to make you redo the work.

@ujjwalagrawal17
Copy link
Contributor Author

@maskaravivek I had shifted rate us feature from nav drawer to about page.

Here is the new UI of about page.
screenshot_20180227-120542

@nicolas-raoul
Copy link
Member

I suggest making it "Rate us" to be case-coherent with the next line.
Otherwise looks good to me :-)

@commons-app commons-app deleted a comment Feb 27, 2018
@maskaravivek
Copy link
Contributor

Thanks for making the changes @ujjwalagrawal17. Can you resolve the merge conflicts too. :)

@ujjwalagrawal17
Copy link
Contributor Author

@maskaravivek How to resolve Travis-ci build failed issue ?

@maskaravivek
Copy link
Contributor

@ujjwalagrawal17 I guess this error is coming after resolving merge conflicts. You would have incorrectly resolved the errors. :)

The travis shows the following error. Please check the xml file.

/home/travis/build/commons-app/apps-android-commons/app/build/intermediates/res/merged/beta/debug/layout/activity_about.xml:172: error: Error parsing XML: mismatched tag

@neslihanturan
Copy link
Collaborator

Thanks @ujjwalagrawal17 !

@neslihanturan neslihanturan merged commit e207edc into commons-app:master Feb 28, 2018
@ujjwalagrawal17 ujjwalagrawal17 deleted the feat5 branch February 28, 2018 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants