Skip to content

Commit

Permalink
More Suspend (AntsyLich#1)
Browse files Browse the repository at this point in the history
Many things regarding listings and filter lists can need network requests, such if we want to fetch tags from the source, or create listings based on what listings the source has.

For getting urls, this can also require network requests since we may need to remotely get a url based on a api call.
  • Loading branch information
Syer10 authored Aug 18, 2024
1 parent 852f0d8 commit aaedba5
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions RFC.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ abstract class Source(context: ExtensionContext): EISource, ExtensionContext by

abstract val language: String

abstract fun getListings(): List<Listing>
abstract fun getFilterList(listing: Listing): FilterList
abstract fun getSearchFilterList(): FilterList
abstract suspend fun getListings(): List<Listing>
abstract suspend fun getFilterList(listing: Listing): FilterList
abstract suspend fun getSearchFilterList(): FilterList

abstract suspend fun getMangaList(
listing: Listing,
Expand Down Expand Up @@ -79,12 +79,12 @@ abstract class HttpSource(context: ExtensionContext): Source(context) {

val needPcUserAgent: Boolean get() = true

abstract fun getMangaUrl(manga: Manga): String
abstract fun getChapterUrl(chapter: Chapter): String
abstract suspend fun getMangaUrl(manga: Manga): String
abstract suspend fun getChapterUrl(chapter: Chapter): String

abstract fun getImageRequest(url: String): HttpRequest
abstract suspend fun getImageRequest(url: String): HttpRequest

abstract fun getCoverRequest(manga: Manga): HttpRequest
abstract suspend fun getCoverRequest(manga: Manga): HttpRequest
}
```
## MangaPagingSource
Expand Down

0 comments on commit aaedba5

Please sign in to comment.