View Single Post
Old 01-08-2023, 06:45 AM   #463
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 11,170
Karma: 77304081
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Quote:
Originally Posted by chaley View Post
IIRC a book can have at most one mark. In this case you should use == instead of 'in', because == is much faster. You could also rewrite the if/then to get rid of it.

Example:
Code:
program:	
	m = is_marked();
	switch_if(
		'reading_list_send_to_device' == m, 'sync.png',
		'reading_list_to_be_read' == m, 'list.png',
		'fff' == m, 'download-metadata.png',
		m, 'marked.png',
		''
	)
Here's the slight problem with that (applies to all three listed):

Click image for larger version

Name:	2023-01-08 07_44_51-Template tester.png
Views:	701
Size:	26.3 KB
ID:	198891
ownedbycats is offline   Reply With Quote