Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ The format is a modified version of [Keep a Changelog](https://keepachangelog.co
- `Other` - for technical stuff.

## [Unreleased]
### Fixed
- Fix custom buttons not being added ([@Secozzi](https://github.com/Secozzi)) ([#164](https://github.com/quickdesh/Animiru/pull/164))

## [v0.19.7.6] - 2026-06-12
### Improved
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class CustomButtonRestorer(
if (dbCustomButton != null) return@map dbCustomButton
val sortIndex = nextSortIndex++
val isFavorite = it.isFavorite && !dbHasFavorite
database.custom_buttonsQueries.insert(
database.custom_buttonsQueries.insertReturningId(
it.name,
isFavorite,
sortIndex,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,14 @@ class CustomButtonRepositoryImpl(
onStartup: String,
) {
try {
database.custom_buttonsQueries.insert(name, false, sortIndex, content, longPressContent, onStartup)
database.custom_buttonsQueries.insert(
name,
false,
sortIndex,
content,
longPressContent,
onStartup,
)
} catch (ex: SQLiteException) {
throw SaveCustomButtonException(ex)
}
Expand Down
14 changes: 8 additions & 6 deletions data/src/main/sqldelight/tachiyomi/data/custom_buttons.sq
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,14 @@ SELECT *
FROM custom_buttons
ORDER BY sortIndex;

insert {
INSERT INTO custom_buttons(name, isFavorite, sortIndex, content, longPressContent, onStartup)
VALUES (:name, :isFavorite, :sortIndex, :content, :longPressContent, :onStartup);

SELECT last_insert_rowid();
}
insert:
INSERT INTO custom_buttons(name, isFavorite, sortIndex, content, longPressContent, onStartup)
VALUES (:name, :isFavorite, :sortIndex, :content, :longPressContent, :onStartup);

insertReturningId:
INSERT INTO custom_buttons(name, isFavorite, sortIndex, content, longPressContent, onStartup)
VALUES (:name, :isFavorite, :sortIndex, :content, :longPressContent, :onStartup)
RETURNING _id;

delete:
DELETE FROM custom_buttons
Expand Down
Loading