mirror of
https://github.com/mihonapp/mihon.git
synced 2025-06-25 10:37:51 +02:00
UI improvements
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user