View Single Post
Old 06-10-2013, 10:44 PM   #417
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by jgoguen View Post
It doesn't look like there's much I could do. The best I could hope for would be to mark all RecentBook entries as disabled, then scan the content table and re-enable any RecentBook entries that are in progress. Of course, assuming that actually works (David refers to the RecentRead event, which I don't have despite having read books and being in progress on a book) this still may not quite be what you want if you have multiple books in progress (depending on if I can get the ordering of timestamps right, and hoping it doesn't break anything...). And if you only have one book, your home screen will have a lot of wasted space.
Sorry, I type what I was thinking the second time rather than the actual value.
Quote:
In investigating this, I do see some interesting uses for database triggers. But they're all better used in David's Utilities plugin to force certain tile types to stay disabled if there's interest in adding that sort of functionality.
I dropped a lot of books on my Glo last night, and the RecentBook entries for the new books all have the Data column set to "X'00000000'" Or at least that is how it shows using the SQLite browser I use. Unfortunately, when I opened a book, this value didn't change. It seems to only change when you add a bookmark or annotation. I'll have to do some experiments to see if the trigger can use the contents table as well.

As we are talking about the database trigger, I might as well show what I currently use:
Code:
CREATE TRIGGER Activity_DismissTiles
after insert on Activity 
for each row 
when ( new.Type IN ('RelatedItems', 'Sync' ))
begin
	update Activity
	set Enabled	= 'false'
	where rowid = new.rowid;
end
That automatically dismisses the Sync and Related Items tiles. An update trigger isn't needed as the firmware does a delete and insert rather than an update.

Actually, it wouldn't be hard to construct and create the trigger from a dialog. Maybe a new feature for the Utilities plugin. Assuming the Product Manager approves.
davidfor is offline   Reply With Quote