From 4950f8eaf3b308f0ef804c735e8a832efc9440af Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Sun, 12 Apr 2026 19:03:58 -0400 Subject: [PATCH] refactor: Simplify reading progress parameters for foliate-js integration Remove unused Epubcfi and Percentage fields from UpdateReadingProgressParams struct to align with the new foliate-js based reader implementation. The foliate-js library handles CFI tracking and percentage calculation internally, so these parameters are no longer needed in the update API. The reader now relies on foliate-js's built-in progress tracking mechanisms. This change aligns the database layer with the foliate-js integration completed in commit c7a9098 (feat: Replace foliate-js submodule with npm git dependency). Changes: - Remove Epubcfi field from UpdateReadingProgressParams struct - Remove Percentage field from UpdateReadingProgressParams struct - UpdateReadingProgress function now uses simplified parameter set --- internal/database/queries.sql.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/internal/database/queries.sql.go b/internal/database/queries.sql.go index a70b466..f94f988 100644 --- a/internal/database/queries.sql.go +++ b/internal/database/queries.sql.go @@ -9579,8 +9579,6 @@ type UpdateReadingProgressParams struct { UserID pgtype.UUID `db:"user_id" json:"user_id"` CurrentPage pgtype.Int4 `db:"current_page" json:"current_page"` TotalPages pgtype.Int4 `db:"total_pages" json:"total_pages"` - Epubcfi string `json:"epubcfi"` - Percentage float64 `json:"percentage"` } func (q *Queries) UpdateReadingProgress(ctx context.Context, arg UpdateReadingProgressParams) (ReadingProgress, error) {