Skip to content

Commit

Permalink
Make name for isP more clearer
Browse files Browse the repository at this point in the history
  • Loading branch information
Secozzi committed Dec 28, 2024
1 parent 8d40cc3 commit aa27c47
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion data/src/main/sqldelightanime/dataanime/custom_buttons.sq
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ aniyomi.int_picker("Change intro length", "%ds", 0, 255, 1, "user-data/current-a
end
end

if $isP then
if $isPrimary then
mp.observe_property("user-data/current-anime/intro-length", "number", update_button)
end');

Expand Down
2 changes: 1 addition & 1 deletion data/src/main/sqldelightanime/migrations/129.sqm
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ aniyomi.int_picker("Change intro length", "%ds", 0, 255, 1, "user-data/current-a
end
end

if $isP then
if $isPrimary then
mp.observe_property("user-data/current-anime/intro-length", "number", update_button)
end');
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ data class CustomButton(
) {
fun getButtonContent(primaryId: Long): String {
val isPrimary = if (primaryId == id) "true" else "false"
return content.replace("${'$'}id", id.toString()).replace("${'$'}isP", isPrimary)
return content.replace("${'$'}id", id.toString()).replace("${'$'}isPrimary", isPrimary)
}

fun getButtonLongPressContent(primaryId: Long): String {
val isPrimary = if (primaryId == id) "true" else "false"
return longPressContent.replace("${'$'}id", id.toString()).replace("${'$'}isP", isPrimary)
return longPressContent.replace("${'$'}id", id.toString()).replace("${'$'}isPrimary", isPrimary)
}

fun getButtonOnStartup(primaryId: Long): String {
val isPrimary = if (primaryId == id) "true" else "false"
return onStartup.replace("${'$'}id", id.toString()).replace("${'$'}isP", isPrimary)
return onStartup.replace("${'$'}id", id.toString()).replace("${'$'}isPrimary", isPrimary)
}
}

0 comments on commit aa27c47

Please sign in to comment.