mirror of
https://github.com/tachiyomiorg/tachiyomi-extensions-inspector.git
synced 2025-01-24 14:31:13 +01:00
fix wrong chapters being removed, fix da css
This commit is contained in:
parent
a02dc02d52
commit
295a0817b0
@ -67,18 +67,20 @@ object Chapter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// clear any orphaned chapters that are in the db but not in `chapterList`
|
// clear any orphaned chapters that are in the db but not in `chapterList`
|
||||||
val dbChapterCount = transaction { ChapterTable.selectAll().count() }
|
val dbChapterCount = transaction { ChapterTable.select { ChapterTable.manga eq mangaId }.count() }
|
||||||
if (dbChapterCount > chapterCount) { // we got some clean up due
|
if (dbChapterCount > chapterCount) { // we got some clean up due
|
||||||
// TODO: delete orphan chapters
|
// TODO: delete orphan chapters
|
||||||
val dbChapterList = transaction { ChapterTable.selectAll() }
|
val dbChapterList = transaction { ChapterTable.select { ChapterTable.manga eq mangaId } }
|
||||||
|
|
||||||
dbChapterList.forEach {
|
dbChapterList.forEach {
|
||||||
(
|
if (it[ChapterTable.chapterIndex] >= chapterList.size ||
|
||||||
it[ChapterTable.chapterIndex] >= chapterList.size ||
|
chapterList[it[ChapterTable.chapterIndex] - 1].url != it[ChapterTable.url]
|
||||||
chapterList[it[ChapterTable.chapterIndex]].url != it[ChapterTable.url]
|
) {
|
||||||
)
|
transaction {
|
||||||
|
PageTable.deleteWhere { PageTable.chapter eq it[ChapterTable.id] }
|
||||||
ChapterTable.deleteWhere { ChapterTable.id eq it[ChapterTable.id] }
|
ChapterTable.deleteWhere { ChapterTable.id eq it[ChapterTable.id] }
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -89,16 +89,9 @@ export default function Manga() {
|
|||||||
{chapters.map((chapter) => ())}
|
{chapters.map((chapter) => ())}
|
||||||
</ol> */}
|
</ol> */}
|
||||||
<Virtuoso
|
<Virtuoso
|
||||||
style={
|
style={{ // override Virtuoso default values and set them with class
|
||||||
{
|
height: 'undefined',
|
||||||
width: '100vw',
|
}}
|
||||||
height: '100%',
|
|
||||||
[theme.breakpoints.up('md')]: {
|
|
||||||
height: 'calc(100vh - 64px)',
|
|
||||||
width: '50vw',
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
className={classes.chapters}
|
className={classes.chapters}
|
||||||
totalCount={chapters.length}
|
totalCount={chapters.length}
|
||||||
itemContent={itemContent}
|
itemContent={itemContent}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user