forked from deliciousblackink/Derpibooru
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from kerastinell/master
Made app working again
- Loading branch information
Showing
7 changed files
with
47 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
app/src/main/java/derpibooru/derpy/server/parsers/RankingImageListParser.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package derpibooru.derpy.server.parsers; | ||
|
||
import org.json.JSONArray; | ||
import org.json.JSONException; | ||
import org.json.JSONObject; | ||
|
||
import java.util.List; | ||
|
||
import derpibooru.derpy.data.server.DerpibooruTagDetailed; | ||
import derpibooru.derpy.server.providers.RankingImageListProvider.RankingsType; | ||
|
||
public class RankingImageListParser extends ImageListParser { | ||
private RankingsType mRankingsType; | ||
|
||
public RankingImageListParser(RankingsType rankingsType, List<DerpibooruTagDetailed> spoileredTags) { | ||
super(spoileredTags); | ||
mRankingsType = rankingsType; | ||
} | ||
|
||
@Override | ||
public JSONArray getRootArray(JSONObject json) throws JSONException { | ||
return json.getJSONArray(mRankingsType == RankingsType.TopScoring ? | ||
"top_scoring" : "top_commented"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters