fix(extension): Prevent crashes related to extensions

Mostly to prevent "NetworkOnMainThreadException"
This commit is contained in:
Ahmad Ansori Palembani 2024-08-23 08:13:00 +07:00
parent ba7baba449
commit 4d2909340e
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6
5 changed files with 10 additions and 6 deletions

View file

@ -448,9 +448,10 @@ abstract class HttpSource : CatalogueSource {
* @return url of the chapter
*/
open fun getChapterUrl(chapter: SChapter): String {
return ""
return pageListRequest(chapter).url.toString()
}
// FIXME: Not sure if this is necessary, feels like this should be handled by the extension not by the app
fun getChapterUrl(manga: SManga?, chapter: SChapter): String? {
manga ?: return null