mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-28 21:33:53 +01:00
Merge 2.10 with master & Fixed merge conflicts (#2844)
This commit is contained in:
parent
02ad3b2dc8
commit
08a555c095
18 changed files with 172 additions and 113 deletions
|
|
@ -69,6 +69,10 @@ public class CustomMwApi {
|
|||
}
|
||||
|
||||
public void setAuthCookie(String authCookie) {
|
||||
if (authCookie == null) {//If the authCookie is null, no need to proceed
|
||||
return;
|
||||
}
|
||||
|
||||
this.authCookie = authCookie;
|
||||
this.isLoggedIn = true;
|
||||
String[] cookies = authCookie.split(";");
|
||||
|
|
|
|||
|
|
@ -319,10 +319,13 @@ public class OkHttpJsonApiClient {
|
|||
if (response.body() != null && response.isSuccessful()) {
|
||||
String json = response.body().string();
|
||||
MwQueryResponse mwQueryResponse = gson.fromJson(json, MwQueryResponse.class);
|
||||
putContinueValues(keyword, mwQueryResponse.continuation());
|
||||
if (mwQueryResponse.query() == null) {
|
||||
if (null == mwQueryResponse
|
||||
|| null == mwQueryResponse.query()
|
||||
|| null == mwQueryResponse.query().pages()) {
|
||||
return mediaList;
|
||||
}
|
||||
putContinueValues(keyword, mwQueryResponse.continuation());
|
||||
|
||||
List<MwQueryPage> pages = mwQueryResponse.query().pages();
|
||||
for (MwQueryPage page : pages) {
|
||||
Media media = Media.from(page);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue