Reposting from https://github.com/k9mail/k-9/pull/558 , hoping to get
more people interested.
Best regards
8
Some ramblings...
I've been looking into the keyword-tag mapping functionality and how
things would look like in StoreSchemaDefinition and the fetching code.
Initially, I was considering adding three more tables (imap_keywords,
ui_tags and keyword_tag_map), so that any keyword could be mapped to any
tag, consistently. However, ensuring the mappings were consistent in the
DB would require changing the messages.flags column as well, so I put
that aside.
The next idea would be a single keyword_and_tag table, (keyword TEXT
UNIQUE, tag TEXT), later possibly with a 'color' field too. In this
case, I'd add the USER_ keywords in lowercase as they came up during
sync, and eventually the user could edit the mappings in a new activity.
Regardless of the design, messages.flags being a multivalued field makes
it a bit cumbersome to simply extend the query and have the tags
magically appear, so I'd probably have to query keyword_and_tag. So what
am I looking for, something inside EmailProvider?
And, finally, another approach that occurred to me was adding the tags
to LocalMessage directly, probably in
LocalMessage.populateFromGetMessageCursor. In this case, I think I need
to create some kind of TagStore similar to LocalStore so I can
discover the tags as the keywords appear.
If anyone can explain the current architecture and/or comment on the
approaches above, I'd be happy to read.
8
--
Igor Almeida
--
--
You received this message because you are subscribed to the K-9 Mail Users List.
To post to this group, send email to k-9-mail@googlegroups.com
To unsubscribe, email k-9-mail+unsubscr...@googlegroups.com
To report an issue with K-9 Mail, visit
http://code.google.com/p/k9mail/issues/list
For more options, visit this group at http://groups.google.com/group/k-9-mail
---
You received this message because you are subscribed to the Google Groups K-9
Mail group.
To unsubscribe from this group and stop receiving emails from it, send an email
to k-9-mail+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.