I was modifying one of my templates and although it's valid I got a result I did not expect.
Code:
program:
k = field('#kobocoll');
if check_yes_no('#onkobo', 0, 1, 0) then 'sync.png'
else if check_yes_no('#onkobo', 0, 0, 1) then
if list_contains(k, ',', '^Kobo Store$', '1', '') then 'drm-locked.png' fi;
if list_contains(k, ',', '^Send to Device$', '1', '') then 'sync.png'
else 'reader.png'
fi
fi
fi
For a book with #onkobo:yes and #kobocoll:"=Kobo Store" I expected to get drm-locked.png.
Instead I got reader.png
I put it in template tester and got the same result so it's not something else accidentally overriding the icon.
I tried removing the ^ and $ in case it was a matching issue but that did not fix it.
What mistake did I make?