1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-08-13 17:03:48 -04:00
Commit Graph

276 Commits

Author SHA1 Message Date
Danny Baumann
565fef0cea Remove own Notification.Builder abstraction.
Replace it by NotificationCompat.Builder, which is in the support
library we're using anyway.
2013-01-02 14:09:37 +01:00
cketti
ba691612dd Add support for "Unified Inbox" and "All messages" to unread widget 2012-12-08 18:15:34 +01:00
cketti
bc4fb530d0 Remove all code using the old unread/flagged count database columns 2012-12-07 15:45:36 +01:00
cketti
04ec2abd2c Use local unread/flagged count in folder list and message list 2012-12-07 15:04:53 +01:00
cketti
251428e963 Restore behavior of unread/flagged filtered message list
The unread/flagged count/view for accounts now excludes special folders
and only includes displayable folders as specified by the display class.
2012-12-07 12:03:04 +01:00
cketti
73757af680 Only count local messages for unread/flagged count
Currently only the Accounts activity uses the new count.

While working on this I realized that the unread/flagged search for
accounts currently looks for unread/flagged messages in all folders, not
all displayable folders without special folders (Trash, Spam, Outbox,
Sent, Drafts) like we used to.
Also, the "All messages" search currently doesn't limit the search to
searchable folders like it is supposed to.
2012-12-07 05:34:44 +01:00
cketti
d5bb462917 Don't create Message objects when changing flags of selected messages
This changes the interface to MessagingController and the way flags are
updated in the database. Now messages aren't changed one by one but in
batches of 500. This should give better performance, but breaks the
unread and flagged count. I'm not very sad about this, because now we
can move towards only displaying the number of unread/flagged messages
in the local database.
2012-12-06 06:26:38 +01:00
cketti
b108e7a539 Don't fetch already downloaded messages found by a server-side search 2012-11-15 21:05:45 +01:00
cketti
d530b20e2b Copy/move all messages in a thread when copying/moving placeholder 2012-11-03 08:30:32 +01:00
cketti
c231b732ac Avoid converting lists to arrays when possible 2012-11-03 05:56:12 +01:00
cketti
02aeccdedc Make flag operations work on all messages in a thread 2012-11-03 05:01:25 +01:00
cketti
36b572fa5f Fix deleteThreadsSynchronous() 2012-11-03 04:25:40 +01:00
cketti
e339dd1f10 Delete all messages in a thread when 'delete' is used on the placeholder 2012-11-03 01:52:45 +01:00
cketti
508e9e8aa6 Don't display threaded message list for filtered views 2012-10-24 05:28:38 +02:00
cketti
ec76dca57f Remove unused stuff 2012-10-24 01:37:33 +02:00
cketti
f1e433e6df Whitespace cleanup 2012-10-16 22:42:51 +02:00
Sander Bogaert
bf82d0af7c Changed all the calls to MessageList to work using the new LocalSearch class. These are all tested and working changes. 2012-10-13 15:06:57 -04:00
Sander Bogaert
d27f909600 Add new search logic to the MessagingController and LocalStore classes. 2012-10-13 08:53:00 -04:00
Sander Bogaert
611bae3fb4 Created search package to hold the framework and moved over the SearchSpecification class ( refactor ). 2012-10-12 12:30:26 +02:00
cketti
63b6b497a0 Early version of message threading
Missing:
- UI support for threading when polling
- code to upgrade existing installations
- UI elements to switch from/to threaded display mode
- threading of messages with same subject
2012-10-08 22:51:29 +02:00
Andrew Chen
2541753aff Handle aborted imap searches by nuking in-progress connections. 2012-09-25 15:46:30 -07:00
Andrew Chen
9f96cd36a7 Move IMAP search into the Folder level.
Should also consider moving the LocalStore search into the folder level and have the store call the folder level searches.
2012-09-25 14:34:59 -07:00
Andrew Chen
270d948edb Remove duplicate notification on remote search start. 2012-09-25 08:16:48 -07:00
Andrew Chen
5b59511c12 Rename variables 2012-09-25 07:50:10 -07:00
Andrew Chen
1ef930090e IMAP Search: log exceptions on remote search, properly dispatch MessageList changes. 2012-09-13 09:10:39 -07:00
ashley willis
df75a9fbfa modified loadMessageForView() to dowload message if neither X_DOWNLOADED_FULL nor X_DOWNLOADED_PARTIAL. 2012-09-13 09:10:38 -07:00
Rob Bayer
fdb1267cb1 Add remote IMAP search support.
* rbayer/IMAPsearch: (21 commits)
  More cleanup
  Code Cleanup getRemoteSearchFullText -> isRemoteSearchFullText line wraps for preference items
  Refactor to allow fetching of extra search results beyond original request.  Most code moved out of ImapStore and ImapFolder and into MessagingController.searchRemoteMessagesSynchronous.  Should make it easier to add remoteSearch for other server types.
  Prevent delete of search results while search results open
  remove duplicated code block
  Don't hide Crypto when IMAPsearch disabled
  Code Style Cleanup: Tabs -> 4 spaces Remove trailing whitespace from blank lines
  tabs -> spaces (my bad...)
  Fix opening of folders to be Read-Write when necessary, even if they were previously opened Read-Only.
  add missing file
  Working IMAP search, with passable UI.
  UI improvements
  Simple help info when enabling Remote Search
  Dependency for preferences
  Basic IMAP search working
2012-09-13 09:10:37 -07:00
ashley willis
9a5ba8001c re Bernhard's Issue 4543 fix: only set as read if account.isMarkMessageAsReadOnView() 2012-09-09 19:31:58 -05:00
Bernhard Redl
3a3cc88171 Fixed Issue 4543: Msg UnRead after "Download Complete" pressed 2012-09-09 19:12:33 -05:00
Bernhard Redl
7c007d19fb added improvements suggested by achen 2012-08-30 17:47:58 +02:00
Bernhard Redl
56105bcfe3 + add support for $Forwarded IMAP flag 2012-08-29 02:26:38 +02:00
cketti
8c11ec18a9 Code style/documentation cleanup (no functional changes) 2012-08-02 02:31:54 +02:00
Bernhard Redl
4028505d69 Extended setting to hide subject in notification area (never, when locked, always)
Fixed issue 2595
2012-08-02 01:47:20 +02:00
cketti
eb7f94a500 Hide "Show unread count" (notifications) on Honeycomb+ devices
On Android 3.0 and newer the notification icon is no longer overlaid
with the 'notification number', so we hide the setting.
2012-07-19 02:23:09 +02:00
cketti
ece107f6d8 Removed unused variable 2012-07-07 14:33:15 +02:00
András Veres-Szentkirályi
2f918c2307 Use more efficient entrySet iterator instead of keySet + get()
The loop extracted keys from `remodeUidMap` and then called
`remouteUidMap.get(...)` for every key. If both the key and the value
needs to be iterated on, `Map.entrySet()` is a more efficient solution
as it doesn't require O(n) Map lookups.
2012-07-06 15:00:25 +02:00
András Veres-Szentkirályi
e3853824db removed empty else clause 2012-07-06 14:04:32 +02:00
cketti
f25422f269 Don't use the NotificationBuilder as singleton 2012-05-08 06:45:04 +02:00
cketti
e1fa90b2fd Use Notification.Builder on Honeycomb+ devices
Using the new helper class we can easily add support for some of the
new notification features later.
2012-05-04 22:03:35 +02:00
Andrew Chen
32ae7bad9c Migrate to Account.has(Special)Folder() methods. 2012-04-17 08:23:22 -07:00
ashley willis
539ab93bcb refactored sorting 2012-04-08 21:29:08 -05:00
cketti
d6a1f2e95c Renamed enum SORT_TYPE to SortType 2012-04-08 23:17:06 +02:00
Jesse Vincent
66528a0ca8 Merge pull request #128 from srinathwarrier/k-9
---

A new option to set default sort setting is added to account settings.

* commit '7a9ba4e0ad483cb275281e8b33d9e6d35d870151':
  Create implicit sort remembering setting2(minor indentation error)
  Create implicit sort remembering setting
  Create default sort setting by preference
2012-04-07 16:53:53 -04:00
cketti
a1caebdcf1 Fixed potential NullPointerException 2012-03-26 19:41:21 +02:00
cketti
365f8e71e0 Fixed array length calculation 2012-03-23 04:20:29 +01:00
cketti
1d28eb003d Added a setting to disable marking messages as read on viewing 2012-03-19 04:44:41 +01:00
cketti
5245191900 Notify the listener provided as argument to doRefreshRemote()
With this change pressing "Refresh folders" in ChooseFolder actually
refreshes the folder list.
2012-03-18 22:43:47 +01:00
ashley willis
f9a30d1822 added sort by arrival option. 2012-03-11 17:48:56 -05:00
cketti
4721d92e79 Avoid some instances of autoboxing
This will hopefully allow us to compile with "Android Java IDE".
2012-03-07 21:40:41 +01:00
Srinath Warrier
ff6e1f6c85 Create default sort setting by preference 2012-03-04 16:20:37 +05:30
cketti
5591865f17 Merge branch 'uidplus' 2012-02-29 14:09:41 +01:00
cketti
c1ed0c78a9 Introduced new pending command to retain upgradability 2012-02-17 01:59:04 +01:00
cketti
f7299a69d4 Keep track of UIDs when moving messages to the trash folder 2012-02-17 00:43:35 +01:00
cketti
4ed77c7a29 Avoid NullPointerException 2012-02-16 22:36:57 +01:00
cketti
89e0ed3c03 Notify listeners of UID changes after remote copy/move 2012-02-16 22:34:50 +01:00
cketti
8e1627e1b9 Merge branch 'master' into uidplus
Conflicts:
	src/com/fsck/k9/controller/MessagingController.java
	src/com/fsck/k9/mail/store/WebDavStore.java
2012-02-16 19:57:24 +01:00
cketti
cf9631d481 Changed the way we decide what message parts to display 2012-02-13 23:11:59 +01:00
cketti
98461e5a21 Notify listeners if unread count changed due to a copy/move operation 2012-02-13 12:16:19 +01:00
cketti
d4bc664c41 Removed unused method 2012-02-13 12:16:19 +01:00
cketti
e87f4cd98a Code cleanup. No functional changes. 2012-02-13 12:16:19 +01:00
cketti
328701e87e Fixed JavaDoc 2012-02-13 00:57:06 +01:00
cketti
53604be914 Fixed NullPointerException 2012-02-13 00:56:34 +01:00
cketti
7ef5f9d37e Set flagged and unread count to 0 when emptying the trash folder 2012-02-04 21:06:35 +01:00
cketti
898f65e081 Changed the way we set flags to update the original Message object 2012-02-04 21:06:34 +01:00
cketti
e8eae37389 Reset unread/flagged count on "empty trash" 2012-01-27 00:51:18 +01:00
cketti
5a8ddaa039 Make sure draft id points to a valid message before deleting it
Avoids IllegalArgumentException in LocalStore.getMessage()
2012-01-26 00:37:25 +01:00
cketti
bddacf6b64 Use database ID to keep track of the current draft
By using the database ID we avoid having to deal with the problem of
changing UIDs. First the message has a local UID, then, when the upload
to the server is completed, it gets a remote UID.
2012-01-22 05:20:41 +01:00
Andrew Chen
ef631e21d1 Merge pull request #83 from andrewachen/messageview_save_location
Restore position in MessageView after rotation screen.
2011-11-07 09:57:18 -08:00
cketti
88a2dd6289 Merge branch 'issue549'
Conflicts:
	src/com/fsck/k9/Account.java
	src/com/fsck/k9/mail/store/WebDavStore.java
2011-11-05 18:47:55 +01:00
Andrew Gaul
647ae0a31c Prefer Collection.isEmpty over size 2011-11-02 20:03:07 -07:00
Andrew Chen
763ff2752d Scroll to the last known position in the MessageView when rotating the screen. 2011-11-02 16:39:23 -07:00
Andrew Gaul
bfd11c444f Prefer entrySet over keySet and get
Addresses FindBugs complaints.
2011-10-31 21:42:12 -07:00
cketti
afd355f83c Use Preferences.getAvailableAccounts() where appropriate 2011-10-18 05:09:20 +02:00
Andrew Gaul
220e55603d Spelling corrections 2011-10-05 22:04:39 -07:00
Jesse Vincent
87640719dd Disable "download by date range" for webdav and pop3.
The previous behavior caused catastrophic network abuse, downloading
messages outside the date range over and over.
2011-07-12 22:05:49 -04:00
Jesse Vincent
c7e8969b01 remove a bunch of listener notification duplication that crept into the
code. this caused all attachments to be double-opened, among other
things
2011-07-09 00:27:56 -04:00
Jesse Vincent
b02b895aaf Add 2MB, 5MB and "All" message download options 2011-07-02 15:29:49 -04:00
Apoorv Khatreja
3321ebdc33 COPYUID changes were being updated only in memory, but were not being written to db. 2011-07-02 11:59:00 +05:30
Apoorv Khatreja
bc9b7030d7 COPYUID implementation now in place and working, restructured appendMessages, copyMessages and moveMessages globally to return a Map of srcUids -> destUids rather than returning nothing. This is now used to bring local and remote UIDs upto speed without the need for additional requests. 2011-06-28 16:50:48 +05:30
Jesse Vincent
3d583da450 ant astyle 2011-06-01 16:03:56 -04:00
Koji Arai
b4f3712246 Should retrieve just visibleLimit messages when the local folder is cleared. 2011-05-25 00:37:51 +09:00
cketti
4f67a6be24 Fixed counting of new unread messages 2011-05-21 00:33:43 +02:00
cketti
6c1b1ebf32 Moved checks from notifyAccount() to shouldNotifyForMessage()
This should fix the "notification count" for cases where messages
passed the shouldNotifyForMessage() checks but not the ones in
notifyAccount().
2011-05-20 23:00:48 +02:00
cketti
dc96bf3186 Only mark all messages as read on the server if that's supported
This change prevents K-9 Mail from establishing a connection to the
server when all messages are marked as read on a POP3 account.
2011-05-14 23:30:47 +02:00
cketti
ba9bc2f8e9 Added method Folder.isFlagSupported(Flag) 2011-05-14 23:19:24 +02:00
Vitaly Polonetsky
37ae2e41f5 fixed displaying of "(null)" account description in notification at account setup wizard 2011-05-05 04:38:33 +08:00
Jesse Vincent
724b6eaaa5 For a while, it was possible for users to conifgure their outbox and
drafts folders to be the same folder. This could result in drafts being
sent over and over.  This change uses the K-9 Identity header as a
shibboleth for drafts, as it's not actually set when a message is sent.
2011-04-17 21:07:13 +10:00
bitblaster
461b57747c Replaced references to K9.INBOX with account.getInboxFolderName() 2011-04-12 22:17:11 +10:00
Jesse Vincent
e19162cb86 ant astyle 2011-03-22 18:07:47 +11:00
Jesse Vincent
daf04c2a9c When showing the root cause of a controller failure, show a better
message if the exception wasn't generated internally
2011-03-09 22:45:57 -05:00
Jesse Vincent
a54cf7a757 Tempfail outgoing messages after 5 delivery attempts 2011-03-09 22:45:57 -05:00
Jesse Vincent
2affa9d52b Permanent failures when trying to deliver a message move it back to
drafts.

Opening a "permfail" message takes you to the drafts folder
2011-03-09 22:45:57 -05:00
Jesse Vincent
d80a941dba Split out "tempfail" and "permfail" message deliver errors 2011-03-09 22:45:57 -05:00
Jesse Vincent
c305397d05 Fix "sending message failed" notifications to actually report the server
error
2011-03-09 22:45:57 -05:00
cketti
44d2194a00 Add extra for the sender address(es) to the "Share intent" 2011-02-13 05:23:18 +01:00
Matt Johnston
ae2c933181 Destroy all messages in one sqlite transaction 2011-02-11 15:30:50 -05:00
cketti
14abb68772 Get rid of the "Fwd: " prefix when sharing a message. Add recipients
to the intent ("To:" -> EXTRA_EMAIL, "CC:" -> EXTRA_CC)
2011-02-09 07:08:10 +01:00
Jesse Vincent
12d1097a24 Big, scary massive "ant astyle" to get us back to something
approximating AOSP coding standards.
2011-02-06 17:09:48 -05:00
Dan Applebaum
4842051de6 Immediately update the title bar when the syncing status changes due to external events. 2011-02-04 23:19:06 -05:00
Dan Applebaum
40bdf99925 Fixes Issue 2934 Fixes Issue 2935
Provides for storing Folder Settings in the central Preferences
Storage as a back-up to the settings stored on each folder.  In this
way, even if the LocalStore DB is recreated or otherwise lost, Folder
Settings can be recovered.

1) Does not change the methodology used to read settings while
running, nor the changes in r3107 & r3116 which tremendously improve
Accounts list loading time.

2) Loads Folder Settings from Preferences and stores on the folder
only when creating a new LocalFolder

3) Saves Folder Settings to Preferences and the DB row every time the
Folder Settings are changed.

4) When upgrading from DB version 41 to 42 or later, copies all
settings for existing folders from the DB storage to the Preferences
Storage.

5) Transactional bulk folder creation and single pass local folder
existence check during "Refresh folders" operation drastically reduces
time spent when refreshing folders from the remote store.

6) Uses prepared statement during Editor commit to reduce Preference
storing time.

Probably needs a reversion of r3239, but I'm unfamiliar with
translations, so am leaving that to others' discretion.
2011-02-04 23:19:06 -05:00