Skip to content

Commit

Permalink
fixed #15
Browse files Browse the repository at this point in the history
  • Loading branch information
fennifith committed May 6, 2018
1 parent 4197385 commit 976ac90
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

Expand Down Expand Up @@ -87,12 +86,14 @@ public void onInit(GitHubData data) {
if ((description == null || !description.startsWith("^")) && repository.description != null)
description = repository.description;

List<LinkInfoData> newLinks = Arrays.asList(
new GitHubLinkInfoData(repository.html_url, 0, true),
repository.homepage.startsWith("https://play.google.com/")
? new PlayStoreLinkInfoData(repository.homepage, 0)
: new WebsiteLinkInfoData(repository.homepage, 0)
);
List<LinkInfoData> newLinks = new ArrayList<>();
if (repository.html_url != null)
newLinks.add(new GitHubLinkInfoData(repository.html_url, 0, true));
if (repository.homepage != null) {
newLinks.add(repository.homepage.startsWith("https://play.google.com/")
? new PlayStoreLinkInfoData(repository.homepage, 0)
: new WebsiteLinkInfoData(repository.homepage, 0));
}

for (LinkInfoData link : newLinks) {
if (links.contains(link))
Expand Down

0 comments on commit 976ac90

Please sign in to comment.