mirror of
https://github.com/mihonapp/mihon.git
synced 2025-10-28 12:57:57 +01:00
Migrate Updates screen to compose (#7534)
* Migrate Updates screen to compose * Review Changes + Cleanup Remove more unused stuff and show confirmation dialog when mass deleting chapters * Review Changes 2 + Rebase
This commit is contained in:
@@ -72,16 +72,6 @@ FROM mangas
|
||||
WHERE favorite = 0
|
||||
GROUP BY source;
|
||||
|
||||
getRecentlyUpdated:
|
||||
SELECT *
|
||||
FROM mangas M
|
||||
JOIN chapters C
|
||||
ON M._id = C.manga_id
|
||||
WHERE M.favorite = 1
|
||||
AND C.date_upload > :after
|
||||
AND C.date_fetch > M.date_added
|
||||
ORDER BY C.date_upload DESC;
|
||||
|
||||
getLibrary:
|
||||
SELECT M.*, COALESCE(MC.category_id, 0) AS category
|
||||
FROM (
|
||||
|
||||
20
app/src/main/sqldelight/migrations/18.sqm
Normal file
20
app/src/main/sqldelight/migrations/18.sqm
Normal file
@@ -0,0 +1,20 @@
|
||||
CREATE VIEW updatesView AS
|
||||
SELECT
|
||||
mangas._id AS mangaId,
|
||||
mangas.title AS mangaTitle,
|
||||
chapters._id AS chapterId,
|
||||
chapters.name AS chapterName,
|
||||
chapters.scanlator,
|
||||
chapters.read,
|
||||
chapters.bookmark,
|
||||
mangas.source,
|
||||
mangas.favorite,
|
||||
mangas.thumbnail_url AS thumbnailUrl,
|
||||
mangas.cover_last_modified AS coverLastModified,
|
||||
chapters.date_upload AS dateUpload,
|
||||
chapters.date_fetch AS datefetch
|
||||
FROM mangas JOIN chapters
|
||||
ON mangas._id = chapters.manga_id
|
||||
WHERE favorite = 1
|
||||
AND date_fetch > date_added
|
||||
ORDER BY date_fetch DESC;
|
||||
25
app/src/main/sqldelight/view/updatesView.sq
Normal file
25
app/src/main/sqldelight/view/updatesView.sq
Normal file
@@ -0,0 +1,25 @@
|
||||
CREATE VIEW updatesView AS
|
||||
SELECT
|
||||
mangas._id AS mangaId,
|
||||
mangas.title AS mangaTitle,
|
||||
chapters._id AS chapterId,
|
||||
chapters.name AS chapterName,
|
||||
chapters.scanlator,
|
||||
chapters.read,
|
||||
chapters.bookmark,
|
||||
mangas.source,
|
||||
mangas.favorite,
|
||||
mangas.thumbnail_url AS thumbnailUrl,
|
||||
mangas.cover_last_modified AS coverLastModified,
|
||||
chapters.date_upload AS dateUpload,
|
||||
chapters.date_fetch AS datefetch
|
||||
FROM mangas JOIN chapters
|
||||
ON mangas._id = chapters.manga_id
|
||||
WHERE favorite = 1
|
||||
AND date_fetch > date_added
|
||||
ORDER BY date_fetch DESC;
|
||||
|
||||
updates:
|
||||
SELECT *
|
||||
FROM updatesView
|
||||
WHERE dateUpload > :after;
|
||||
Reference in New Issue
Block a user