Merge 2.9 release with master (#2174)

* Fix memory leak due to wikidata edit listener (#2048)

* Fix bookmark crash fix (#2047)

* Fix bookmark crash fix

* Fix check for bookmark creator

* Bug fix #2042 (#2056)

* Bug fix #2042
* Added a snack with retry when api in AA fails
* Increased connection timeouts in okhttpclient builder

* added missing string resource

* Bugfix/duplicate categories (#2080)

* Increased timeout to 60 seconds

* Bug fix #1550
* filter duplicate categories

* Fix crash because of inactive fragment UI (#2046)

* Fix crash because of inactive fragment UI

* Add java docs

* Add information icon action Fiixes #2055 2.9.0: the 'i' icon in nearby doesn't do anything (#2057)

* Localisation updates from https://translatewiki.net.

* Remove unused mediawiki api dependency (#1991)

* Categories with pipe suffix (#1873)

* Bug fix issue #1826
Changes made :
-Certain category names used to show suffixed with strings prefixed with pipe '|'. Removed everything after the pipe. As per the discussion on the thread, its safe to remove everything after the pipe, including the pipe

* review suggested changes
*Code formatting
*Extracted out the index of pipe in a variable
*Added issue link in comments

* Remove libraries section from README (#1988)

* Remove libraries section from README

* Add wiki link to "libraries used" to README

* Localisation updates from https://translatewiki.net.

* Localisation updates from https://translatewiki.net.

* Use alert dialog instead of popup window, for nearby information

* Revert irrelevant changes, sorry
This commit is contained in:
Vivek Maskara 2018-12-19 22:29:49 +05:30 committed by neslihanturan
parent 21edcb7cbe
commit f3b450e020
19 changed files with 91 additions and 65 deletions

View file

@ -185,6 +185,7 @@ public class AchievementsActivity extends NavigationBaseActivity {
* which then calls parseJson when results are fetched
*/
private void setAchievements() {
progressBar.setVisibility(View.VISIBLE);
if (checkAccount()) {
compositeDisposable.add(mediaWikiApi
.getAchievements(Objects.requireNonNull(sessionManager.getCurrentAccount()).name)
@ -195,17 +196,23 @@ public class AchievementsActivity extends NavigationBaseActivity {
if (response != null) {
setUploadCount(Achievements.from(response));
} else {
onError();
showSnackBarWithRetry();
}
},
t -> {
Timber.e(t, "Fetching achievements statistics failed");
onError();
showSnackBarWithRetry();
}
));
}
}
private void showSnackBarWithRetry() {
progressBar.setVisibility(View.GONE);
ViewUtil.showDismissibleSnackBar(findViewById(android.R.id.content),
R.string.achievements_fetch_failed, R.string.retry, view -> setAchievements());
}
/**
* Shows a generic error toast when error occurs while loading achievements or uploads
*/