mirror of
https://github.com/tachiyomiorg/tachiyomi-extensions-inspector.git
synced 2025-01-24 06:21:16 +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`
|
||||
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
|
||||
// TODO: delete orphan chapters
|
||||
val dbChapterList = transaction { ChapterTable.selectAll() }
|
||||
val dbChapterList = transaction { ChapterTable.select { ChapterTable.manga eq mangaId } }
|
||||
|
||||
dbChapterList.forEach {
|
||||
(
|
||||
it[ChapterTable.chapterIndex] >= chapterList.size ||
|
||||
chapterList[it[ChapterTable.chapterIndex]].url != it[ChapterTable.url]
|
||||
)
|
||||
|
||||
ChapterTable.deleteWhere { ChapterTable.id eq it[ChapterTable.id] }
|
||||
if (it[ChapterTable.chapterIndex] >= chapterList.size ||
|
||||
chapterList[it[ChapterTable.chapterIndex] - 1].url != it[ChapterTable.url]
|
||||
) {
|
||||
transaction {
|
||||
PageTable.deleteWhere { PageTable.chapter eq it[ChapterTable.id] }
|
||||
ChapterTable.deleteWhere { ChapterTable.id eq it[ChapterTable.id] }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -89,16 +89,9 @@ export default function Manga() {
|
||||
{chapters.map((chapter) => ())}
|
||||
</ol> */}
|
||||
<Virtuoso
|
||||
style={
|
||||
{
|
||||
width: '100vw',
|
||||
height: '100%',
|
||||
[theme.breakpoints.up('md')]: {
|
||||
height: 'calc(100vh - 64px)',
|
||||
width: '50vw',
|
||||
},
|
||||
}
|
||||
}
|
||||
style={{ // override Virtuoso default values and set them with class
|
||||
height: 'undefined',
|
||||
}}
|
||||
className={classes.chapters}
|
||||
totalCount={chapters.length}
|
||||
itemContent={itemContent}
|
||||
|
Loading…
x
Reference in New Issue
Block a user