Fixes Issue 1105
Fixes Issue 1395
Fixes Issue 1421
Fixes Issue 1426
When the remote store is incapable of returning an unread message count (POP)
or a flagged message count (POP, WebDAV), count the number of local
messages with the desired atributes.
Keep search results in sync with newly arrived or deleted messages.
Intentionally does not remove messages from search results due to
flag (flagged/starred or read/unread) state changes, because that
would be awkward while manipulating messages in search results.
When connected to a server that does not automatically send an
untagged UIDNEXT with the responses to SELECT, explicitly SEARCH for
the currently highest UID in the folder on the server and then add 1
to it to get the UIDNEXT.
searchable folders, and the various search strategies.
Integration takes precedence over searchability. The Integrated Inbox
doesn't care about folder searchability. Nor does an unread or flag
search on specific folders.
Searches on specific accounts always go for displayable folders. That
might need to change so that searches on specific accounts can be on
DISPLAYABLE or ALL, but never NEVER. But in the current approach,
account-specific searches are done from the Accounts Activity, which
has an unread counter based on displayable non-special folders, so the
present implementation is the most logical for now.
interfering with "unread" searches on POP3 accounts.
Flags really should be normalized in the database to eliminate the use
of LIKE while searching by Flags.
Pass around simple Serializable MessageReference objects containing
account UUID, folder name and message UID so that MessageView can
traverse lists of messages which span folders and accounts.
Fixes ClassCastException.
Also:
Envelope and star in Accounts Activity are now both "hot". Tapping
the main part of the search opens the full search; tapping the
envelope opens the search only for unread messages; tapping the star
opens the search but only for starred messages.
The envelope and star are a bit small to reliably tap. Both options
should be available via long-press, also.
Methodology will be extended to real accounts, as well.
Fixes Issue 1431
Present flagged message count inside a star, matching the visual
presentation on individual messages.
Provide display of unread and flagged message counts for canned
searches.
Perhaps the message counts for searches and account size display
should be defeatable for improved speed.
Computing the account size is pretty slow for big accounts, and making
this functionality optional should be considered.
Also, displays the number of flagged messages ("stars") in each
account in the Accounts list and each folder in the FolderList. Needs
better presentation of the flagged message counts, but this works as a
proof-of-concept and gets the data structures built.
Look for + as acknowledgement that we're in IDLE mode, not "idling"
string.
Also, to help with battery life:
1) Give up trying to IDLE after 10 failures.
2) Increase retry delays
Not done, yet, but available for developers to use.
Definite things to be done in the short term:
1) Allow user to hide canned searches in Accounts Activity
2) Make newly arrived mail immediately appear in search results.
Possible improvements:
3) User-definable searches
4) Make newly deleted mail immediately disappear search results.
5) Make message with flag changes immediately appear/disappear from
search results.
6) Show search result size in Accounts Activity.
Fixes Issue 1126
Apply skisters2's patch for the POP notifications. Also, add another
setRingNotified at the beginning of each poll to make sure the account
is in the right state.
Allow user to turn off gesture-based control.
Also, consolidate so that gestures could be used by other subclasses
of K9Activity. Probably should be made usable to K9ListActivity, too,
by making MyGestureDetector its own class and make it used by
K9Activity and K9ListActivity, and have the Activities implement a
callback interface for onNext and onPrevious.
Provides for the user to elect to have certain folders displayed first
in the FolderList. Folders so elected are displayed in alphabetical
order first, then folders not so elected are displayed alphabetical
order.
No special handling is done for Inbox any more, except that it is in
"top group" by default, to preserve current behavior until the user
changes the settings.
Implement DEFLATE compression for IMAP communication, enabled by
default. User can disable compression for Wi-Fi, Mobile, or Other
networks, if it causes problems or if uncompressed communication is
faster, which is possible on Wi-Fi and wired networks, especially.
"Other" is to allow for the Android platform to introduce new
networking types without having to immediately change K-9 Mail.
However, as those arise, new network types should be added as explicit
types in K-9 Mail.
Fixes Issue 1278
Fixes Issue 119
Fixes Issue 1077
Fixes Issue 1238
Worked performed by danapple0 and cketti in
https://k9mail.googlecode.com/svn/k9mail/branches/issue1116
Add support for most batch ops (except move and copy) in search
results. Add support for batch move and copy on real folders.
Increase efficiency of bulk IMAP moves and copies by doing as multiple
UID operations.
Eliminated serialization of Account objects.
Provide up-references in useful places to make all future code cleaner
and more efficient.
Fixed a bunch of draft handling
Merged from issue1116 branch, except for Account.java, which was
copied wholesale. Account.java was manually merged in issue1116
branch at r1489
svn merge -r 1459:1489 https://k9mail.googlecode.com/svn/k9mail/branches/issue1116 .
cp ../issue1116/src/com/fsck/k9/Account.java src/com/fsck/k9/Account.java
As a side effect of this fix sending mail could be slightly faster now due to less packets being sent.
Big thanks to Kevin Newland of Michigan Technological University for organizing a test account.
Fixes issue 799
Handle CAPABILITY response in following cases:
1) When sent as part of the banner, no longer sends explicit
CAPABILITY command
2) When sent as an UNTAGGED response to LOGIN, updates stored
capabilities.
3) When sent as part of the TAGGED response to LOGIN, updates stored
capabilities.
Due to odd implementation of the CRAM-MD5 authentication, the
capability updates will not happen as part of the CRAM-MD5
authentication.
a) is already known if the server supports the NAMESPACE capability.
b) is included in the prefix anyway (=also known if namespace was set manually).
c) isn't needed when selecting a mailbox because we currently don't support folder hierarchy. So the delimeter is included in the folder name.
Fixes issue 1217
At cketti's suggestion, change the methodology for counting
server-side unread messages on an IMAP server from STATUS (UNSEEN) to
SEARCH UNSEEN NOT DELETED. STATUS (UNSEEN) does not ignore DELETED
but unexpunged messages and leads to incorrect results.
http://www.mail-archive.com/c-client@u.washington.edu/msg00929.htmlhttp://www.mail-archive.com/c-client@u.washington.edu/msg00931.html
This variant only checks for unread messages in the last 300 messages
in the folder, so will be wrong if there are unread messages earlier
in the folder. However, it'll be more often correct than the old
version for the marjority of users.
Also, change the opening of folders for IMAP IDLE purposes to
read-only using EXAMINE instead of SELECT.
of the last successful periodic mail and computes the next start time
as an offset from that successful finish. The ramifications of this
new method is that changing polling interval on an account does not
force delaying all accounts to poll next in the future by the new
interval. Instead, K-9 Mail now adjusts the next poll time based on
what the next poll time should be based on the last poll finish and
the new interval.
Example 1: In the old way, if the old polling interval was 1 hour, and
the next poll was 50 minutes away (10 minutes have passed), and you
changed the interval to 15 minutes, the poll would happen 15 minutes
from now. In the new way, the next poll will happen only 5 minutes
from now, which is 15 minutes since the last poll.
Example 2: In the old way, if the old polling interval was 1 hour, and
the next poll was 10 minutes away (50 minutes have passed), and you
changed the interval to 30 minutes, the poll would happen 30 minutes
from now. The next poll would then happen actually 80 minutes after
the previous poll completed. In the new way, it'll actually happen
immediately, because the time for the next poll, based on the new
schedule, has already passed.
Similar scenarios happen when a loss of network connectivity
occurs. In the old way, polling would resume using the restoration of
connectivity as the starting point. Each time network connectivity
was lost and restored, the next poll would be further delayed. *If
connectivity was lost and restored frequently, a poll might never
happen!* In the new way, the next poll is rescheduled based on the
time of the last successful poll, so will be rescheduled just like it
was before the loss of connectivity. If the time has already been
passed, the poll will happen immediately.