mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-28 21:33:53 +01:00
Update master with backend overhaul branch (#2829)
* Beginnings of integration with Wikipedia client library. (#2642) * Remove remaining unnecessary API version check. * Roll up sleeves. * Add and integrate the beginnings of app adapter. * Remove vestigial event logging logic. Event logging is no longer used in this app. * Beginnings: remove StringUtils and associated redundancies. * Remove redundant capitalize() method. * Remove redundant urlEncode() method. * Remove redundant (and incomplete) language lists. * Remove redundant usages of SimpleDateFormat. * Remove redundant json type adapter. * Remove redundant MW error model classes. * Rip out redundant MW model classes. * Pass SessionManager into AppAdapter instead of injecting. * Wire up more of the AppAdapter. * Remove redundant Gson initialization and type adapters. * Rip out PageTitle. This was being used in some slightly incorrect/unexpected ways. * Don't need static WikiSite. * Bump data client library version * Bump library version and fix build * Fix tests * Fix build * Fix media of the day * With fixes in recently modified APIs
This commit is contained in:
parent
76e5a30fb5
commit
dcbf076965
76 changed files with 424 additions and 2122 deletions
|
|
@ -26,6 +26,8 @@ import android.widget.TextView;
|
|||
|
||||
import com.dinuscxj.progressbar.CircleProgressBar;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
|
|
@ -42,7 +44,6 @@ import fr.free.nrw.commons.Utils;
|
|||
import fr.free.nrw.commons.auth.SessionManager;
|
||||
import fr.free.nrw.commons.mwapi.OkHttpJsonApiClient;
|
||||
import fr.free.nrw.commons.theme.NavigationBaseActivity;
|
||||
import fr.free.nrw.commons.utils.StringUtils;
|
||||
import fr.free.nrw.commons.utils.ViewUtil;
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.disposables.CompositeDisposable;
|
||||
|
|
@ -243,7 +244,7 @@ public class AchievementsActivity extends NavigationBaseActivity {
|
|||
@SuppressLint("CheckResult")
|
||||
private void setWikidataEditCount() {
|
||||
String userName = sessionManager.getUserName();
|
||||
if (StringUtils.isNullOrWhiteSpace(userName)) {
|
||||
if (StringUtils.isBlank(userName)) {
|
||||
return;
|
||||
}
|
||||
compositeDisposable.add(okHttpJsonApiClient.getWikidataEdits(userName)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue