Commit Graph

145 Commits

Author SHA1 Message Date
cketti fc8d2e9979 Merge branch 'master' into issue549
Conflicts:
	res/menu/accounts_context.xml
	res/menu/accounts_option.xml
	res/values/strings.xml
	src/com/fsck/k9/Account.java
	src/com/fsck/k9/activity/Accounts.java
	src/com/fsck/k9/activity/AsyncUIProcessor.java
	src/com/fsck/k9/activity/FolderList.java
	src/com/fsck/k9/activity/ImportListener.java
	src/com/fsck/k9/activity/K9Activity.java
	src/com/fsck/k9/activity/K9ListActivity.java
	src/com/fsck/k9/activity/MessageView.java
	src/com/fsck/k9/mail/store/ImapStore.java
	src/com/fsck/k9/mail/store/Pop3Store.java
	src/com/fsck/k9/mail/store/WebDavStore.java
	src/com/fsck/k9/mail/transport/SmtpTransport.java
2011-10-14 20:33:25 +02:00
danapple c67ac4735f Fixes Issue 3177
Dynamically update the FolderList titlebar when the unread state of a
listed folder changes.  This implementation applies the folder unread
count delta to the account-level unread count, to avoid the expense of
recomputing the entire account's unread count.  If no FolderInfoHolder
for this folder already exists, skip the recomputation of the
account-level unread message count.
2011-09-05 11:20:57 -05:00
Koji Arai fda43206a3 Fixed the below issue for GalaxyS and S2.
When scrolling a ListView, all items turn black.
it was reproduced on FolderList, MessageList and Accounts, other views were not.
2011-07-20 22:13:20 +09:00
Koji Arai 870791958f Refresh folder list when folder is cleared 2011-05-05 07:08:33 +09:00
Jesse Vincent 0174988d27 astyle 2011-04-12 22:16:22 +10:00
cketti 4aec4b096c Added option to disable confirmation dialog for "mark all as read"
Fixes issue 1415
2011-04-01 05:34:27 +02:00
cketti ea9213cd4d Converted some more confirmation dialogs to use ConfirmationDialog 2011-04-01 03:40:08 +02:00
Jesse Vincent b8949abaca Kill some now-dead and duplicate code 2011-03-25 15:56:25 +11:00
Jesse Vincent e19162cb86 ant astyle 2011-03-22 18:07:47 +11:00
mwolschon 0be4f95430 update issue 3130
"Allow filtering in FolderList"
2011-03-14 13:37:22 +01:00
danapple 32b5afc702 astyle 2011-03-02 07:34:54 -06:00
cketti 203dab5c64 Revert changes for issue 549 (import/export settings).
The feature will be polished in branch "issue549".
2011-02-28 22:55:34 +01:00
danapple 932d178679 Merge branch 'issue549'
Conflicts:
	src/com/fsck/k9/Account.java
	src/com/fsck/k9/K9.java
	src/com/fsck/k9/Preferences.java
	src/com/fsck/k9/activity/Accounts.java
	src/com/fsck/k9/activity/ActivityListener.java
	src/com/fsck/k9/activity/ChooseFolder.java
	src/com/fsck/k9/activity/FolderInfoHolder.java
	src/com/fsck/k9/activity/FolderList.java
	src/com/fsck/k9/activity/K9Activity.java
	src/com/fsck/k9/activity/K9ListActivity.java
	src/com/fsck/k9/activity/MessageList.java
	src/com/fsck/k9/activity/MessageReference.java
	src/com/fsck/k9/activity/MessageView.java
	src/com/fsck/k9/activity/setup/AccountSettings.java
	src/com/fsck/k9/controller/MessagingController.java
	src/com/fsck/k9/crypto/Apg.java
	src/com/fsck/k9/helper/DateFormatter.java
	src/com/fsck/k9/helper/DomainNameChecker.java
	src/com/fsck/k9/mail/Address.java
	src/com/fsck/k9/mail/internet/MimeHeader.java
	src/com/fsck/k9/mail/internet/MimeMessage.java
	src/com/fsck/k9/mail/internet/MimeUtility.java
	src/com/fsck/k9/mail/store/ImapStore.java
	src/com/fsck/k9/mail/store/LocalStore.java
	src/com/fsck/k9/mail/store/WebDavStore.java
	src/com/fsck/k9/mail/transport/SmtpTransport.java
	src/com/fsck/k9/view/AttachmentView.java
2011-02-27 13:09:38 -06:00
danapple ad3dd07a7a astyle-d 2011-02-26 18:39:06 -06:00
danapple 6dc94fb78e First mostly working copy of export/import. Committing while I sort
out how to use git.
2011-02-26 11:31:56 -06:00
Jesse Vincent 260b933a3b Move the "update the title" code from almost every single
ActivityListener callback to the superclass, removing the need for many
sublcass methods
2011-02-13 21:20:22 -05: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 e31d218dc5 At Jesse's suggestion, avoid the use of the Android term-of-art "density". Instead use "Compact layouts" to refer, both internally and externally, to the feature of elminating minimum sizes on UI elements and other minor layout changes for maximizing information quantity to be displayed on a page.
Others are free to adjust the user-facing text further.
2011-02-04 23:19:06 -05:00
Daniel Applebaum 6c03c968ef Provide for users with good eyesight to completely take advantage of the
"smaller" (and smaller) fonts by allowing the Accounts and Folder List
items to have a height smaller than the normal Android minimum.  This
option is off by default to maintain existing behavior for
uninterested parties.  The preferences text is not especially
compelling so could certainly be changed if better phrasing is found.
2011-02-03 03:42:45 +00:00
cketti 22834d6998 Removed unnecessary null pointer checks 2011-01-19 01:30:13 +00:00
cketti 7119c7165f Removed unnecessary type casts 2011-01-19 01:21:27 +00:00
cketti 365b106753 Fixed warnings about unchecked casts by extracting the code to methods and using the @SuppressWarnings annotation on them. 2011-01-19 00:36:15 +00:00
Jesse Vincent 0c426c9c4b Round our color chips, clean up color hcip rendering a bit 2010-12-28 09:11:10 +00:00
Fiouz a667a72585 Don't reference the enclosing type instance when it's not used (memory optimisation) 2010-12-14 19:26:02 +00:00
Jesse Vincent 063bbb904f Extract SizeFormatter into helpers 2010-12-13 01:02:39 +00:00
Jesse Vincent 675651286b Added the ability to completely wipe the localy cached messages of a syncced folder. 2010-11-14 00:49:25 +00:00
Jesse Vincent 14055691a3 Merge branch 'mail-on-sd'
* mail-on-sd: (40 commits)
  Added more comments to explain how the locking mecanism works for LocalStore
  Fixed wrong method being called during experimental provider initialization (since provider isn't enabled, that didn't harm)
  Add more comments about how the various StorageProviders work and how they're enabled
  find src/com/fsck/ -name \*.java|xargs astyle --style=ansi --mode=java --indent-switches --indent=spaces=4 --convert-tabs
  French localization for storage related settings
  Remove unused SD card strings (replaced with storage indirection)
  Merge mail-on-sd branch from trunk
  Reset mail service on storage mount (even if no account uses the storage, to be improved)
  find src/com/fsck/ -name \*.java|xargs astyle --style=ansi --mode=java --indent-switches --indent=spaces=4 --convert-tabs
  Migraion -> Migration
  move the Storage location preference into preferences rather than the wizard.
  Made LocalStore log less verbose Added @Override compile checks
  Added ACTION_SHUTDOWN broadcast receiver to properly initiate shutdown sequence (not yet implemented) and cancel any scheduled Intent
  Be more consistent about which SQLiteDatabase variable is used (from instance variable to argument variable) to make code more refactoring-friendly (class is already big, code extraction should be easier if not referencing the instance variable).
  Added transaction timing logging
  Factorised storage lock/transaction handling code for regular operations.
  Use DB transactions to batch modifications (makes code more robust / could improve performances)
  Merge mail-on-sd branch from trunk
  Update issue 888 Added DB close on unmount / DB open on mount
  Update issue 888 Back to account list when underlying storage not available/unmounting in MessageView / MessageList
  ...
2010-11-13 21:40:56 +00:00
Jesse Vincent 3779237eb8 remove a special flag in FolderInfoHolder that we only use twice and
appear to initialize unreliably in favor of some simple checks.
2010-11-13 03:09:27 +00:00
Jesse Vincent f874f0f9d3 replace a single-use single-line private method with its body in the one place it was used 2010-11-13 01:46:36 +00:00
cketti b44bed2596 Fix NullPointerException
Fixes issue 2261
2010-09-03 01:16:41 +00:00
Jesse Vincent 0b62640eac Provisional initial commit of MessagingProvider code by
stephane.lajeunesse and koxx33

We're going to try it out in the 3.1 dev series. if it ends up looking
good, it'll be in 3.2
2010-08-18 02:49:13 +00:00
Jesse Vincent ff5024eaec astyle 2010-08-18 02:48:55 +00:00
cketti 02aad5945a Added null pointer check.
See issue 2154
2010-08-16 19:34:48 +00:00
cketti 0eb342ef5a Code cleanup (Removed unused imports, added @Override annotations) 2010-08-13 14:06:13 +00:00
Marcus Wolschon 97001b6edb filter on folder-selection 2010-08-13 06:37:00 +00:00
Jesse Vincent 8f1d535630 make it possible to get to global settings from the folder list 2010-07-16 01:24:01 +00:00
Jesse Vincent ed86fc8371 First pass at better end-user visibility into what K-9 is doing when we
appear to "sit" while syncing headers.
2010-07-13 23:59:14 +00:00
Jesse Vincent ab8cdb3522 minor astyling 2010-07-10 16:41:48 +00:00
Thialfihar 76df04e949 make shortcuts honour the account setting for the startup folder even if changed after shortcut creation, based on cketti's patch, refs issue 1025 2010-07-07 18:31:16 +00:00
Thialfihar 00a8f948eb added launcher shortcuts to accounts, refs issue 1025 2010-07-07 16:17:13 +00:00
Thialfihar 03b28c8b68 Added account settings for "archive" and "spam" folders. See issue 3. 2010-07-04 13:48:06 +00:00
Daniel Applebaum c3739bb43b Fixes Issue 1755
r1789 has incorrect Issue (1411) mentioned.
2010-06-09 00:16:55 +00:00
Daniel Applebaum 6476281379 Fixes Issue 1411
Only automatically finish the FolderList Activity when actively
managing the back button.
2010-06-08 23:26:48 +00:00
Jesse Vincent c287c2e7df Patch from fiouzy to fix back-button in folderlist when you don't have
"Manage Back Button" enabled.
2010-06-06 21:48:44 +00:00
Jesse Vincent 1a66072910 find src/com/fsck/ -name \*.java|xargs astyle --style=ansi --mode=java --indent-switches --indent=spaces=4 --convert-tabs --unpad=paren 2010-05-30 04:17:00 +00:00
Jesse Vincent 6b5bcd2c4d Make the back button behaviour configurable. The default should remain
identical to the most recent behaviour. As an option, the user can force
back to always go "up" a level like Jesse likes
2010-05-30 04:16:44 +00:00
cketti b5a6a28f19 Fixed some more warnings:
- Removed unused imports
- Removed unnecessary @SuppressWarnings("deprecation") annotations
- Added @SuppressWarnings("deprecation") to API 1-3 code that's now (API 5) deprecated
- Added missing @Override annotation
2010-05-19 18:44:22 +00:00
cketti 58b8479612 Code refactoring:
- Created "controller" and "mail.filter" package
- Moved a lot of classes to new/other packages
- Removed unused classes: NoSuchProviderException, MessageDateComparator
2010-05-19 18:17:06 +00:00
Daniel Applebaum 9cf42ef913 Provide for tracking all WakeLock usage.
Simplify WakeLocks use by pushing.

Correct fault in IMAP IDLE WakeLock usage.  The ThreadLocal in
MessagingControllerPushReceiver meant that the WakeLock acquired when
the DONE was sent was not being released when entering back into IDLE
state.

Consolidate the account notification so that all Activities use the
methods in MessagingController.
2010-05-17 00:30:32 +00:00
Jesse Vincent ecebdf18cd find src/com/fsck/ -name \*.java|xargs astyle --style=ansi --mode=java --indent-switches --indent=spaces=4 --convert-tabs --unpad=paren 2010-05-15 19:46:16 +00:00
Daniel Applebaum b51bce6ebf Fixes Issue 1551
Fixes Issue 1577

Issue 1551: 
Some IMAP servers send untagged EXPUNGEs to IDLEing
clients without ever haven't sent an untagged FETCH.  The untagged
EXPUNGEs are harder to deal with because they don't have a UID.  So,
if the user has elected to have the IDLE connection start with a poll,
we can maintain a map of message sequence numbers to UIDs that we can
use to figure out which message to delete.  To mitigate the risk of
the map falling out of date, we do a UID SEARCH UID before removing
the local copy of the message, just to make sure the message is really
gone from the server.  If we detect an error, do another poll to
resync the map.

Issue 1577:
Restore the removal of notifications for an account when the account's
unread message count goes to 0.
2010-05-15 19:35:07 +00:00
Daniel Applebaum 1502660826 Fixes Issue 1561
The user can elect to have opening a Notification open a
account-specific search for unread messages.
2010-05-12 05:35:08 +00:00
Daniel Applebaum 8b92bc3836 Fixes Issue 1474
Fixes Issue 1562

Issue 1474:
Provide new facility to totally wipe all data for an account but leave
settings intact.  This is useful because sometimes storage is so full
that SQLite cannot perform the usual VACUUM or message deletion.

Add confirmation dialogs to destructive Clear and Recreate operations.

Remove destructive Clear from FolderList so as not to have to
duplicate the confirmation dialogs.

Issue 1562:
Suppress notifications when new messages arrive in Trash, Sent or
Drafts special folders.
2010-05-12 04:17:52 +00:00
Jesse Vincent ba021597c4 astyle 2010-05-12 02:51:59 +00:00
Daniel Applebaum 6e9145f037 Adjunct to the new variable font sizes, allow the Account list and
Folder list items to vary in size based on the font sizes.
2010-05-02 04:54:09 +00:00
Jesse Vincent 8af7f4a7b6 find src/com/fsck/ -name \*.java|xargs astyle --style=ansi --mode=java --indent-switches --indent=spaces=4 --convert-tabs --unpad=paren 2010-04-29 04:59:14 +00:00
Jesse Vincent d6bc0765d8 Allow users to set the account 'Chip' color per account. 2010-04-25 08:47:24 +00:00
Daniel Applebaum c7d679f773 Folder List should use Folder List-specific font sizes. 2010-04-24 19:15:43 +00:00
Daniel Applebaum f185240f67 Make stars and envelopes on folder active. 2010-04-24 19:10:57 +00:00
cketti f8695f9a61 Added preference screen to pick font sizes for all important information in account list, folder list, message list and message view.
Fixes issue 7
2010-04-20 16:37:03 +00:00
Daniel Applebaum f27aa4c5c0 Only show flagged message counters when star preference is selected 2010-04-17 04:33:25 +00:00
Daniel Applebaum 5bd24fe425 Fixes Issue 1410
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.
2010-04-17 03:32:17 +00:00
Daniel Applebaum 5e30d5a784 Fixes Issue 1429
Remove dead code.
2010-04-16 14:46:44 +00:00
Daniel Applebaum 1079e03495 Fixes Issue 1430
Displaying the progress in the list was way too slow.
2010-04-16 14:44:01 +00:00
Daniel Applebaum 664c4d6a78 Fixes Issue 1394
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.
2010-04-16 14:33:54 +00:00
cketti 57cc4cd735 Code cleanup. Fixed lots of warnings reported by Eclipse.
- Removed unused imports
- Removed unused variables/code
- Parametrized raw types
- Added @Override annotations
- Added hashCode() when equals() was overriden
2010-04-16 12:20:10 +00:00
Daniel Applebaum 9a8126d89c Addresses Issue 1348 and Issue 95
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.
2010-04-06 02:54:48 +00:00
Daniel Applebaum f0808fb3e0 Fixes Issue 1291
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.
2010-03-07 17:02:21 +00:00
Daniel Applebaum c0e4220b82 Fixes Issue 1116
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
2010-03-04 04:00:30 +00:00
Jesse Vincent f9d39e4814 Back out Attachments-on-SD support (it's on a feature branch now, while
Bao-Long makes it extra-awesome)

This commit should revert:
r1445
r1437
r1436
r1449
r1442
r1441
r1419
r1414
r1413
2010-02-18 03:28:31 +00:00
Daniel Applebaum 23e5a132d4 Provide title bar display of next polling time 2010-02-09 03:26:40 +00:00
Daniel Applebaum 164ee7cbfd Fixes Issue 1059
Only reschedule polling and setup pushing when necessary due to
particular setting changes.  Makes the K-9 Mail UI much more
responsive to setting changes that do not affect polling and pushing.

The poll schedule is deliberately only rescheduled when the period is
decreased.  An increase in period will still allow the next scheduled
check to happen as originally scheduled.
2010-02-07 21:23:33 +00:00
Daniel Applebaum 1fb03a45a0 Fixes Issue 1059
Provides for menu items to quickly change the mode of displayed
folders.  Also, reorganizes the menu to have an Advanced sub-menu,
like Accounts page has.

Desparately needs a new icon for the Folders menu item.
2010-02-06 23:23:22 +00:00
Bao-Long Nguyen-Trong 55dac7ee4e Added option to have attachments store on sd card
(this is still a rough implementation)
2010-02-06 15:22:59 +00:00
Daniel Applebaum 6f064e1193 Partial implementation for Issue 1059. Doesn't help those without
physical keyboards, though, and should be modified to only re-setup
pushers.  Current implementation causes a wasteful reschedule of
polling.

Also gets the help Toast for the folder up-to-date after the
FolderList/MessageList split.
2010-02-06 05:55:40 +00:00
Jesse Vincent a9b538fd09 stop views from "resetting" to previous intents on rotate. 2010-02-04 02:38:30 +00:00
Jesse Vincent 5ce80cadaa Move FolderList initialization a bit earlier so as to not explode on reuse of the activity.
Fixes issue 1164
2010-02-04 01:49:56 +00:00
Jesse Vincent c38384e134 Further refactoring to MessageList and FolderList to (hopefully) address
force-closes and inconsistent data on activity reuse. Also, removing
broken/unused code to preserve activity state across invocations.
across invocations.
2010-01-30 03:26:45 +00:00
Jesse Vincent 22e1a3f574 Rather than manually managing the back button, try to give android better back button hinting
fix our notification -> intent behavior
2010-01-29 03:57:37 +00:00
Jesse Vincent 1945dc4ad4 Clean up our back button support to be actually consistent and to not leak nearly as many activities. 2010-01-28 00:29:27 +00:00
Bao-Long Nguyen-Trong 08e570d40f Fixed issue 1046 bu ending FolderList activity after auto-opening the default folder 2010-01-20 00:21:48 +00:00
Daniel Applebaum f4ceb8d2bc Fixes Issue 673
Fixes Issue 806

Make sure to close opened folders in finally blocks in
MessagingController.

Don't make another connection when deleting or copying a
message.  (Nicely speeds up copy and delete, as well.)

Another connection is still created for creating a folder while
copying or deleting (a pretty rare event), and the IMAP IDLE
connections are not re-used for user initiated activity.
2010-01-16 16:22:20 +00:00
Jesse Vincent 512177cded Remove more of the old messagepassing ui update code in favor of 'runonuithread' 2010-01-09 21:47:10 +00:00
Jesse Vincent e1c686d40d Fix NullPointerException when the user clicks on a "new mail"
notification.  Resolves Issue 1001
2010-01-08 23:18:44 +00:00
Daniel Applebaum 56a4b94748 Put the color chip with read/unread controlled brightness at all
levels except MessageView
2010-01-06 05:23:32 +00:00
Daniel Applebaum 29947ef3c9 Delete obsolete commented out code. 2010-01-06 03:40:24 +00:00
Daniel Applebaum 60a2ceb604 Fixes Issue 934 by removing excess calls to finish() 2010-01-04 00:50:19 +00:00
Jesse Vincent a926911e7f rerun astyle 2010-01-03 01:50:51 +00:00
Daniel Applebaum 41d7ca51a3 Implementation of complete IMAP two-phase "delete/expunge" behavior.
On each IMAP account, the expunge behavior can be set to expunge
messages in a folder as soon as a move or delete is performed on the
folder ("immediately"), each time the folder is polled, or only when
executed manually.

In the Message List, there is now an Expunge action in the option
menu.

In the Folder List, there is now an Expunge action in the context
menu (long-press on the folder).

For IMAP accounts, it is also possible to disable the copying of deleted messages to the
Trash folder, by setting the Trash folder to -NONE-.

Fixes Issue 536.

Separately, in WebDAV accounts, the user can now choose the
server-side equivalents of the special folders, just like for IMAP.
2009-12-20 23:13:49 +00:00
Jesse Vincent 3914a78b53 xargs astyle --style=ansi --mode=java --indent-switches \
--indent=spaces=4 --convert-tabs --unpad=paren
2009-12-20 05:41:43 +00:00
Daniel Applebaum 921b022fb5 Enhanced header in Accounts, MessageList and Folder to show the unread
count, scoped for the Activity, the in-progress operation, the account
on which the operation is in progress, the folder for the operation,
when appropriate, and the progress of the operation, when it applies
to multiple items.  For the MessageList, also use the determinate
progress bar to show progress for synchronization of the folder being
displayed.

Fixes Issue 924.

Also, a minor change that might help with Issue 913, by putting the
insertion of the pending command into a background thread.
2009-12-20 00:02:46 +00:00
Jesse Vincent 462d4098e0 Removed debugging log messages that clutter and slow the runtime app 2009-12-18 03:49:19 +00:00
Jesse Vincent 9ae7934cad improve the MessageList->FolderList flow. Should fix Issue 916 2009-12-16 05:26:43 +00:00
Jesse Vincent f31b2702a4 Massive rename to K9, step 1.
Conflicts:

	src/com/android/email/Email.java
2009-12-15 02:50:53 +00:00