UI improvements

This commit is contained in:
Yuri Revich
2015-12-01 20:16:55 +03:00
parent c62fc05f8b
commit 0f7c20d015
17 changed files with 113 additions and 50 deletions

View File

@ -5,6 +5,7 @@ import com.squareup.okhttp.Response;
import org.jsoup.nodes.Document;
import java.net.URI;
import java.util.List;
import eu.kanade.mangafeed.data.database.models.Chapter;
@ -80,6 +81,14 @@ public abstract class BaseSource {
// Get the URL of the first page that contains a source image and the page list
protected String overrideChapterUrl(String defaultPageUrl) {
if(defaultPageUrl.startsWith("http")){
try {
URI uri = new URI(defaultPageUrl);
defaultPageUrl = uri.getPath() + "?" + uri.getQuery();
}catch (Exception ignored){
return defaultPageUrl;
}
}
return defaultPageUrl;
}

View File

@ -49,6 +49,7 @@ public class CatalogueAdapter extends ArrayAdapter<Manga> {
@Bind(R.id.title) TextView title;
@Bind(R.id.author) TextView author;
@Bind(R.id.thumbnail) ImageView thumbnail;
@Bind(R.id.favorite_sticker) ImageView favorite_sticker;
CatalogueFragment fragment;
@ -73,6 +74,12 @@ public class CatalogueAdapter extends ArrayAdapter<Manga> {
} else {
thumbnail.setImageResource(android.R.color.transparent);
}
if(manga.favorite){
favorite_sticker.setVisibility(View.VISIBLE);
}else{
favorite_sticker.setVisibility(View.INVISIBLE);
}
}
}
}