Skip to content

Conversation

@madhurgupta10
Copy link
Collaborator

@madhurgupta10 madhurgupta10 commented Apr 4, 2019

Description
Moved the hardcoded URLs to a constant file so that the code is easier to maintain, also it removed the duplicate strings :)

Fixes #2850 Moving URLs from About Activity to build.gradle

Tests performed
Tested betaDebug on Xiaomi Mi A1 with API level 28 stock android.

@codecov-io
Copy link

codecov-io commented Apr 4, 2019

Codecov Report

Merging #2851 into master will increase coverage by 0.04%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #2851      +/-   ##
=========================================
+ Coverage    3.64%   3.69%   +0.04%     
=========================================
  Files         244     247       +3     
  Lines       12190   12217      +27     
  Branches     1078    1083       +5     
=========================================
+ Hits          444     451       +7     
- Misses      11712   11732      +20     
  Partials       34      34
Impacted Files Coverage Δ
...c/main/java/fr/free/nrw/commons/AboutActivity.java 0% <0%> (ø) ⬆️
app/src/main/java/fr/free/nrw/commons/Urls.java 0% <0%> (ø)
...va/fr/free/nrw/commons/campaigns/CampaignView.java 0% <0%> (ø) ⬆️
...free/nrw/commons/theme/NavigationBaseActivity.java 0% <0%> (ø) ⬆️
...n/java/fr/free/nrw/commons/auth/LoginActivity.java 0% <0%> (ø) ⬆️
...free/nrw/commons/campaigns/CampaignsPresenter.java 0% <0%> (ø) ⬆️
.../free/nrw/commons/di/CommonsApplicationModule.java 0% <0%> (ø) ⬆️
...a/fr/free/nrw/commons/review/ReviewController.java 0% <0%> (ø) ⬆️
...ee/nrw/commons/upload/SpinnerLanguagesAdapter.java 0% <0%> (ø) ⬆️
.../commons/contributions/ContributionViewHolder.java 0% <0%> (ø) ⬆️
... and 13 more

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 5419733...df475dc. Read the comment docs.

Copy link
Member

@nicolas-raoul nicolas-raoul left a comment

Choose a reason for hiding this comment

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

Not tested but looks good to me.

@madhurgupta10 madhurgupta10 changed the title Moved hardcoded URLs to build.grade Fixed #2850 Moved hardcoded URLs to a constant file Fixed #2850 Apr 16, 2019
@madhurgupta10
Copy link
Collaborator Author

@maskaravivek changes made as per the discussion

static final String CREDITS_URL = "https://github.com/commons-app/apps-android-commons/blob/master/CREDITS";
static final String FAQ_URL = "https://github.com/commons-app/apps-android-commons/wiki/Frequently-Asked-Questions";
static final String PLAY_STORE_URL = "https://play.google.com/store/apps/details?id=fr.free.nrw.commons";
static final String TRANSLATE_WIKI_URL = "https://translatewiki.net/w/i.php?title=Special:Translate&group=commons-android-public static final Strings&filter=%21translated&action=translate&language=";
Copy link
Collaborator

Choose a reason for hiding this comment

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

This string seems problematic, can you verify @madhurgupta10 ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@neslihanturan Fixed. Sorry for the Typo, I used "find and replace" from the android studio and did not notice, this also got changed.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Find and replace is quite risky:)

@neslihanturan neslihanturan merged commit 5d827e4 into commons-app:master May 10, 2019
@madhurgupta10 madhurgupta10 deleted the issue-2850 branch May 10, 2019 12:11
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.

Moving hardcoded URLs from About Activity to a constant file

4 participants