SelfManga parser

This commit is contained in:
Koitharu
2020-02-02 15:27:22 +02:00
parent 6d4a77b023
commit 7d677833fa
5 changed files with 82 additions and 3 deletions

View File

@@ -5,9 +5,12 @@ import kotlinx.android.parcel.Parcelize
import org.koitharu.kotatsu.core.parser.MangaRepository
import org.koitharu.kotatsu.core.parser.site.MintMangaRepository
import org.koitharu.kotatsu.core.parser.site.ReadmangaRepository
import org.koitharu.kotatsu.core.parser.site.SelfMangaRepository
@Suppress("SpellCheckingInspection")
@Parcelize
enum class MangaSource(val title: String, val cls: Class<out MangaRepository>): Parcelable {
READMANGA_RU("ReadManga", ReadmangaRepository::class.java),
MINTMANGA("MintManga", MintMangaRepository::class.java)
MINTMANGA("MintManga", MintMangaRepository::class.java),
SELFMANGA("SelfManga", SelfMangaRepository::class.java)
}

View File

@@ -0,0 +1,10 @@
package org.koitharu.kotatsu.core.parser.site
import org.koitharu.kotatsu.core.model.MangaSource
import org.koitharu.kotatsu.domain.MangaLoaderContext
class SelfMangaRepository(loaderContext: MangaLoaderContext) :
GroupleRepository(MangaSource.SELFMANGA, loaderContext) {
override val domain: String = "selfmanga.ru"
}

View File

@@ -30,7 +30,7 @@ class MainActivity : BaseActivity(), NavigationView.OnNavigationItemSelectedList
navigationView.setNavigationItemSelectedListener(this)
if (!supportFragmentManager.isStateSaved) {
setPrimaryFragment(RemoteListFragment.newInstance(MangaSource.READMANGA_RU))
navigationView.setCheckedItem(R.id.nav_history)
}
}