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

461 Commits

Author SHA1 Message Date
cketti
14ff4d006e Removed onBackPressed() magic 2011-11-10 05:38:52 +01:00
cketti
85f556e6c9 Removed helper function to create AbsoluteSizeSpan objects 2011-11-10 05:38:51 +01:00
cketti
e2e9f8b6a3 Fixed startActivityForResult() failing for MessageList
Fixes issue 3638
2011-11-07 00:07:06 +01:00
Andrew Gaul
647ae0a31c Prefer Collection.isEmpty over size 2011-11-02 20:03:07 -07:00
Andrew Chen
30151f1a70 Add parameter to MyGestureDetector to enable gestures for a specific detector, even if system-wide gestures are disabled. 2011-11-01 17:25:49 -07:00
Andrew Chen
edd78ea10c Make the K9Activity GestureDetector more generic so that it can be used by both MessageList and MessageView.
Make the mTopView a ToggleScrollView.  The only consumer is currently the MessageView, which uses a ToggleScrollView anyway.  This should make it easier to reuse the anti-scrolling features in ToggleScrollView for ListView later on.
2011-11-01 16:55:13 -07:00
Andrew Gaul
220e55603d Spelling corrections 2011-10-05 22:04:39 -07:00
Koji Arai
f3795f3df5 Search same sender from searchable folders instead of the unified inbox 2011-09-16 01:33:51 +09:00
Jesse Vincent
7b7601082b the refactoring to combine batch and record logic added an extra check
that broke delete of single messages from message list.
2011-07-23 18:45:43 -04: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
Jesse Vincent
a558466c36 ant astyle 2011-06-13 19:49:06 -04:00
Fiouz
c416f02d52 Improve BACK button handling for MessageView
Remove memory leak from referencing MessageView context from the
Intent that is created to go back to MessageList. MessageView is no
longer hardcoded to go back to MessageList, it instead uses an Intent
given at creation to get back to the originating Activity.

Try our best to restore the MessageList in its previous state when
"Manage BACK button" option is enabled:
Since MessageList lives in its own task, we look for the previous
active task and check whether its top activity matches it. If it does,
we just finish MessageView and Android will automatically restore the
previous task. If it doesn't, we launch the originating Intent (and
MessageList state will be lost).

If option is off, we get the regular Android behavior: got back to the
previous screen, whenever it's the MessageList or another application
if the user long-pressed HOME.

The consequence of this is the need for a new permission in order to
check the previous active task: android.permission.GET_TASKS
2011-06-08 22:53:23 +02:00
Fiouz
9b0ce3c75a Remove no longer used references on confirmation dialog disapproval 2011-06-07 01:25:38 +02:00
Fiouz
fc4dd077e4 Don't attempt to configure a dismissed dialog during Android activity
reloading

As part of automatic activity reloading following a configuration
change, Android invokes Activity#onPrepareDialog() even for dismissed
dialogs. Consequently, one can't make the assumption that this method
is only invoked by explicit calls to Activity#showDialog() from our
code.

The actual problem here was the mActiveMessages member being null
at such times.
2011-06-07 01:15:04 +02:00
Fiouz
72870174ce Pluralize the "Move to spam" confirmation dialog since code paths were
unified in MessageList and multi-selection is now subject to this
dialog.
2011-06-05 01:35:11 +02:00
Fiouz
de7b75a1df Properly keep selection in case of a
configuration change (orientation, keyboard, etc.) during user
interaction (e.g. a dialog)
2011-06-05 01:16:34 +02:00
Fiouz
5366a07f28 Add @Override compiler check 2011-06-04 23:55:48 +02:00
Fiouz
190d028669 Javadoc fix 2011-06-04 23:17:47 +02:00
Fiouz
821a00e727 MessageList refactoring to remove duplicate code paths.
Message operations should be more consistent now, regardless of how
the messages are selected (long click, checkbox+Menu, future group selection).

This is a backport of the modifications made on the issue258 branch,
without the threading specific features (no new feature introduced).
2011-06-04 23:01:34 +02:00
cketti
c5342472f2 Load AbsoluteSizeSpan(int,boolean) constructor via reflection
This will allow us to run on Android 1.5/1.6 devices.
2011-05-26 23:43:35 -04:00
cketti
01937d4ab8 Don't crash if "footer view" is clicked in search results
Fixes issue 3071
2011-05-01 05:34:17 +02:00
Koji Arai
9b2e4c43a9 Fixed default sender color in the MessageList 2011-04-26 23:49:25 +09:00
Koji Arai
659a5d36b2 Fixed issue 2991: Should display colorized name in the message list. 2011-04-16 18:16:33 +09:00
bitblaster
ccc79f62b9 Replaced references to K9.INBOX with account.getInboxFolderName() 2011-04-12 22:17:11 +10:00
Jesse Vincent
0174988d27 astyle 2011-04-12 22:16:22 +10:00
Sander Bogaert
17cb5106f6 The date format preference is now refreshed each time the messages get listed.
Previously, changes to the date format preference weren't noticed until
the app restarted.
2011-04-12 21:44:51 +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
e3e31062ad Only keep reference to selected message if necessary
Only keep mSelectedMessage pointing to the currently selected message
if we use the spam action and ask for confirmation before moving.
2011-04-01 03:45:50 +02:00
cketti
ac148a1ef7 Extracted confirmation dialog creation to ConfirmationDialog
Confirmation dialogs in MessageList and MessageView now use the new
ConfirmationDialog class.
2011-04-01 03:17:47 +02:00
cketti
449d4df2a9 Minor code cleanup 2011-04-01 03:13:23 +02:00
Archibald Sheran
80f055a0a7 Issue 2296 Spam message 2011-04-01 05:54:51 +08: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
cketti
5f0e51caa9 Added a comment 2011-02-20 19:02:42 +01:00
Jan Berkel
cc0b935b38 Performance fix: Use ListView#addFooterView to add the footer
The previous approach (generating the view in the adapter) kills performance
  because list views cannot be recycled anymore, as soon as the user scrolls to
  the bottom of the list. The Android ListView widget already provides support
  for list header/footers, so use them.
2011-02-20 17:47:06 +01:00
cketti
737cff0612 Hardcode folder name for (local) outbox and don't show outbox when
only being allowed to select remote folders.
2011-02-20 04:47:28 +01:00
Jan Berkel
685df0ff67 Perf improvement: use parcels instead of serializable
Standard Java serialization is slow on Android. Replacing it w/
  parcelable makes it around 10x faster (on a N1, with ~ 500 messages
  in the list).

  To avoid further confusion and potential bugs MessageReference was
  made no longer implement Serializable.
2011-02-19 15:24:53 -05: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
4e48366243 Remove more redundant checks 2011-02-13 21:20:21 -05:00
Jesse Vincent
be106c21a1 remove completely redundant code from batch archive/spam codepaths. (It
duplicated code in the batch move codepath)
2011-02-13 21:20:21 -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
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
cketti
a9cee7a6ad Rewrote code to get rid of return statement in finally block (which generated a warning). 2011-01-19 00:23:56 +00:00
Jesse Vincent
bd66315375 Visual cleanup of messageview. Clean up of icon display codepaths 2011-01-17 17:25:00 +00:00
Jesse Vincent
de806f7715 astyle 2011-01-06 16:55:08 +00:00
cketti
a1e059e871 Introduced setting to change the font size of the message preview in the message list.
Fixes issue 2788
2010-12-30 00:52:00 +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
36858f53de Don't reference the enclosing type instance when it's not used (memory optimisation) 2010-12-14 19:26:25 +00:00
Jesse Vincent
4bb5acb51c Revert "stop fading the chip if a message is read. we already change text"
It's contentious to change, apparently. So, revert until it's a setting
This reverts commit a6060fa66c8ae6001c402b0f3ac3d240b7348b8e.
2010-12-07 01:22:35 +00:00
Jesse Vincent
174a62536e Resolves Issue 2719: Message List Previews: Read message senders are shown in bold patch from achen.code 2010-11-30 01:04:24 +00:00
Jesse Vincent
f98a2db2ab stop fading the chip if a message is read. we already change text
weight
2010-11-29 03:24:57 +00:00
Jesse Vincent
dbc07d14ee Revert "http://code.google.com/p/k9mail/issues/detail?id=2682" until we
can make it configurable, per discussion with Marcus

This reverts commit 1436eeefa292f64c8c9aa6ec9fa2daaeafeb93fd.
2010-11-29 02:21:27 +00:00
Jesse Vincent
4f376e8332 astyle 2010-11-28 20:28:37 +00:00
Jesse Vincent
75108f4078 move toMe and ccMe into LocalMessage from MessageInfoHolder 2010-11-27 04:03:10 +00:00
Jesse Vincent
580f47998d Remove subject from messageinfoholder 2010-11-27 04:03:06 +00:00
Jesse Vincent
60a538e071 Remove "preview" form messageinfoholder 2010-11-27 04:03:02 +00:00
Jesse Vincent
f9981dcf7c lift hasAttachments to LocalMessage 2010-11-27 04:02:56 +00:00
Jesse Vincent
23254e8998 BatchButton area toggling should't happen from anything other than the
UiThread:

Fixes a common error from the market:

android.view.ViewRoot$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
at android.view.ViewRoot.checkThread(ViewRoot.java:2802)
at android.view.ViewRoot.invalidateChild(ViewRoot.java:607)
at android.view.ViewRoot.invalidateChildInParent(ViewRoot.java:633)
at android.view.ViewGroup.invalidateChild(ViewGroup.java:2505)
at android.view.View.invalidate(View.java:5139)
at android.view.View.setFlags(View.java:4502)
at android.view.View.setVisibility(View.java:3030)
at
com.fsck.k9.activity.MessageList.hideBatchButtons(MessageList.java:2883)
at
com.fsck.k9.activity.MessageList.toggleBatchButtons(MessageList.java:2906)
at com.fsck.k9.activity.MessageList.access$500(MessageList.java:77)
at
com.fsck.k9.activity.MessageList$MessageListAdapter.pruneDirtyMessages(MessageList.java:2302)
at com.fsck.k9.activity.MessageList$1.run(MessageList.java:811)
2010-11-26 03:53:10 +00:00
Marcus Wolschon
4f08820683 http://code.google.com/p/k9mail/issues/detail?id=2682
mark multiple mails as SPAM
2010-11-22 08:12:48 +00:00
cketti
0560dc28d9 Don't use the application context to start the Accounts activity (because then we'd have to create a new task)
Fixes issue 2653
2010-11-18 09:08:40 +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
76e26607b8 Added a first pass implementation of being able to resend a message. 2010-11-13 03:09:32 +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
a8de2d0000 astyle 2010-11-13 01:47:08 +00:00
Jesse Vincent
24b018a812 replace a trivial one-line method that was called twice with its body 2010-11-13 01:46:41 +00:00
Jesse Vincent
af5f78928c Add a "fetch all messages" visible limit 2010-11-12 23:41:43 +00:00
Jesse Vincent
d45081abaa Animate the batch-operations toolbar (Imported from AOSP) 2010-11-07 19:40:42 +00:00
Jesse Vincent
6528b2d775 lift up font setting code to be with the rest of the initial messagelist item setting code 2010-11-07 00:30:17 +00:00
Jesse Vincent
9d69875246 Add a new preference to let users select how many lines of message
preview show in message-preview mode.
2010-11-05 02:59:26 +00:00
Jesse Vincent
d0e85ce43a astyle 2010-11-05 02:59:21 +00:00
Jesse Vincent
602099cfd3 Be more careful about deleting messages from the MessageListAdapter -
don't do it from something that's not the UI thread
2010-11-05 01:16:35 +00:00
Jesse Vincent
6704279042 redo our messagelist sigil code to not break sender colorization 2010-10-25 03:21:08 +00:00
Jesse Vincent
96f1d9eadf Fix phantom messages in unified inbox. 2010-10-23 15:19:56 +00:00
Jesse Vincent
64c102dd14 notification that the dataset changed needs to happen on the UI thread. 2010-10-21 20:49:48 +00:00
Jesse Vincent
48f2885cfc When returning from a messageview to a messagelist do our listview
updates on a thread rather than on the main ui thread. it results
in the list blinking with old data, but that's still a better user
experience than "frozen"
2010-10-21 20:49:36 +00:00
Jesse Vincent
e8756af4f1 astyle 2010-10-21 20:49:20 +00:00
Jesse Vincent
2a4792eb60 update a comment about an uncommon code path 2010-10-21 20:49:05 +00:00
Jesse Vincent
8d9c074a27 Add gmail-style "to me" and "cc me" indicators in messagelist 2010-10-21 20:48:45 +00:00
Jesse Vincent
e05784d41d Running heavy operations on the UI thread makes K-9's UI slow and
freezy.  addOrUpdateMessages is very heavy. and very common.
2010-10-21 20:48:12 +00:00
Jesse Vincent
b2a08d969b Revert "For the common case of "getMessage" where we actually have the object in"
This doesn't work on initial sync, since the comparisons fail and you're
left with duplicates in the displayed mailbox
This reverts commit fa1c88bec348d0132acc60a320626bf0ca1170ec.
2010-10-16 08:27:58 +00:00
Jesse Vincent
28c9dfdcce Delay formatting of dates in messagelist until we actually need them
-- it turns out they're very expensive.
2010-10-13 10:53:08 +00:00
Jesse Vincent
4e53ee12b6 For the common case of "getMessage" where we actually have the object in
the list, use a less painful equality check than iteration.

This works because messageInfoHolders compare to each other using the
same key as message they contain.
2010-10-13 10:52:53 +00:00
Jesse Vincent
e8fd9683e6 Optimize the new return-to-listview code. (Avoid a bug where we do far
too much work on first open of a message list)
2010-10-11 19:47:41 +00:00
Jesse Vincent
72cb0bf7ec remove debugging statement 2010-10-08 06:56:50 +00:00
Jesse Vincent
ccc9a99d94 make batch buttons behave correctly if the last selected item is deleted
while in a messageview
2010-10-08 06:18:45 +00:00
Jesse Vincent
b0de9913e0 more correct list updates after restore 2010-10-08 06:18:30 +00:00
Jesse Vincent
945bccd633 First pass at a sane "restore list state" behavior when going back to a
messagelist from a message view
2010-10-08 05:34:33 +00:00
Jesse Vincent
6061c42ea9 find src/com/fsck/ -name \*.java|xargs astyle --style=ansi --mode=java --indent-switches --indent=spaces=4 --convert-tabs 2010-10-05 06:04:28 +00:00
cketti
00ffc4f7fe Reverted "shortcut" to global settings in menu for search results (message list) as this led to display problems with Android 2.2.
Fixes issue 2347
2010-10-04 00:01:59 +00:00
Fiouz
f1d413ce77 Optimization: extracted populate() outside MessageInfoHolder in order to properly cache DateFormat (avoid useless DateFormat costly lookup at each population) 2010-10-03 10:56:16 +00:00
Fiouz
4cb2d52c9c Refactored message sorting code by extracting the sort code from the sorted object (this was a bad design, worsened by the MessageProvider patch). Ideally, new Comparator classes should get promoted to top-level classes and not be enclosed in MessageList.
Subject stripper backported from issue258 branch (Utility.java)
The result is a cleaner MessageInfoHolder class.
2010-09-21 22:12:45 +00:00
Jesse Vincent
3291c585e8 Improve Volume navigation settings, fix a bug when a list view is in
touch mode.

Patch by fiouzy.
2010-09-03 21:41:32 +00:00
cketti
0c27a1ab0e Avoid division by zero.
Fixes issue 2259
2010-09-03 00:56:19 +00:00
Jesse Vincent
6573f27cec do our messagelist updates from sync on the ui thread rather than the
sync thread. copy the incoming message list to deal with concurrent
access issues.  Patch by cketti++
2010-09-02 03:45:16 +00:00
Jesse Vincent
a1496bd839 Revert the clever runonuithread hack from the previous commit, as it
leads to concurrent modification exceptions. "oops" :/
2010-08-31 04:29:56 +00:00
Jesse Vincent
7030967fa7 astyle 2010-08-31 03:58:33 +00:00
Jesse Vincent
7bd8fc3599 When we sync messages and are displaying a messagelist, do the listview
updates on the UI thread rather than the sync thread. This is a huge
performance boost (based on simple empirical testing) for initial syncs
as we now do more work as we add messages to message lists
2010-08-31 03:57:02 +00:00
Koji Arai
b1074329e4 On the MessageList and the MessageView, prefer to use the display name registered in the Contacts rather than raw addresses.
Update issue 2144
2010-08-30 14:37:34 +00:00
Jesse Vincent
12eb866370 Remove a temporary variable 2010-08-30 02:16:38 +00:00
Jesse Vincent
65f0d22355 Add Volume button navigation in MessageView, MessageList and all
K9ListActivity subclasses.

The MessageView code is a patch from paulkilroy@gmail.com.

Fixes Issue 2112
2010-08-30 02:16:20 +00:00
Jesse Vincent
7d2804549e Remove redundant "return" statements from the end of void methods (with
help from intellij)
2010-08-29 23:39:45 +00:00
Jesse Vincent
4f0bce1569 Simplify many, many boolean conditions with help from IntelliJ 2010-08-29 23:39:26 +00:00
Marcus Wolschon
726b472330 set context before using it 2010-08-18 14:13:37 +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
Jesse Vincent
54633a4e16 Improvements to "more from this sender" - hopefully this should search
only on actual addresses, not their local parts.
2010-08-12 02:22:08 +00:00
Fiouz
380452355c MessageListAdapter:
- Use of a single View.OnClickListener for all messages.
- Extracted method to bind message item views (from MessageInfoHolder to MessageViewHolder).
2010-08-03 07:46:31 +00:00
Fiouz
ad9c315cf4 No longer need to extend Handler since r1126: we're using Activity.runOnUiThread() 2010-08-03 06:09:39 +00:00
Fiouz
2a476dc92c Additional @Override compile check 2010-08-03 05:46:35 +00:00
Fiouz
44cef83e0b Use of constants for immutable empty arrays (prevent useless memory allocation) 2010-08-02 11:55:31 +00:00
Fiouz
3bbb6ae050 Don't display Archive/Spam batch operations when corresponding folders are unset 2010-07-30 09:58:26 +00:00
Jesse Vincent
7a4d12b53b Merge from apg-integration 2010-07-27 12:10:09 +00:00
Jesse Vincent
19a06d39a1 With all the other performance work we've been doing, getting a message
into the messagelist is now much, much faster. Intentionally loading the
whole mailbox before we let the user interact with the list is
increasingly painful. A 250 message mailbox takes 2+ seconds to "unlock"
on a modern phone.

Consequently, this commit switches us _back_ to progressive loading of
mailboxes from the synchronous version.

Based on user feedback, we may or may not keep this for the production
release.
2010-07-22 04:17:13 +00:00
Jesse Vincent
2ee5b49cf2 When marking a message as read as we're opening it from the message
list, don't "bother" sorting the messagelist again before opening the
message, it adds a _bit_ of slowness when we don't need it and
we'll sort again when we get back to the message list.
2010-07-19 01:54:38 +00:00
Jesse Vincent
a63beda64b Finish backing out the "sort by received date" patch until we get the
recieved-date support sorted out
2010-07-19 01:53:14 +00:00
Thialfihar
cc71273c4b remember which message was selected in MessageList in case the list changes while the dialog is up
Fixes issue 906
2010-07-14 18:39:57 +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
Thialfihar
014b6c19c3 svn:eol-style=LF for src and XML resources
Fixes issue 1982
2010-07-13 21:49:28 +00:00
Jesse Vincent
70a1eef943 astyle 2010-07-13 21:16:56 +00:00
cketti
49e5ad4963 More cosmetic changes (again no change in functionality) 2010-07-12 02:17:48 +00:00
cketti
173b36d04e Removed unnecessary null pointer check. 2010-07-12 01:39:29 +00:00
cketti
f40a01b0d2 "Optimized" computeBatchDirection() to exit the loop once newState is set to true because it can never be changed to false again. 2010-07-12 01:09:47 +00:00
cketti
6fc14b9e07 Cosmetic changes to the code (no change in functionality) 2010-07-12 01:06:33 +00:00
cketti
e3cb9f4603 Synchronize iterator accesses to mHandler.messages to avoid ConcurrentModificationException in MessageList. Original analysis and patch was provided by fiouzy.
Fixes issue 1598
2010-07-11 22:01:11 +00:00
Jesse Vincent
ab8cdb3522 minor astyling 2010-07-10 16:41:48 +00:00
Jesse Vincent
61b25c8760 only store an internalDate if we actually get it from the server; If we
don't have an internaldate, use the sentdate for sorting comparisons.
2010-07-10 16:40:34 +00:00
Thialfihar
f2fe826fb3 make MessageList remember the last selected item 2010-07-09 11:12:32 +00:00
Jesse Vincent
dbb4d6e21c Now that we have internal_date on all messages, we should be using it
for sorting. This will prevent spam with ...less true dates from pushing
messages to the top of your list. Additionally, when downloading
messages from the server, they'll actually appear in the order they were
received - the existing behaviour really screwed up users who were
trying to triage mail as it came in.
2010-07-08 16:33:19 +00:00
Thialfihar
190b597a45 add Archive keyboard shortcut to MessageList, refs issue 3 2010-07-08 15:27:22 +00:00
cketti
365d82407a Make "Settings" work in search folders.
Fixes issue 1844
2010-07-08 13:30:30 +00:00
Thialfihar
00a8f948eb added launcher shortcuts to accounts, refs issue 1025 2010-07-07 16:17:13 +00:00
Jesse Vincent
a826f33eb3 find src/com/fsck/ -name \*.java|xargs astyle --style=ansi
--mode=java --indent-switches --indent=spaces=4 --convert-tabs
--unpad=paren
2010-07-06 10:29:26 +00:00
Thialfihar
96b93f7327 minor coding style fixes 2010-07-05 18:06:30 +00:00
Thialfihar
8752347b5f merged archive-move-spam-buttons into trunk 2010-07-05 13:41:52 +00:00
cketti
42b0845522 Remember last selected folder for copy and move operations and scroll this folder into view on subsequent folder selections (for move and copy operations).
Fixes issue 1538
2010-07-04 23:29:57 +00:00
Thialfihar
03b28c8b68 Added account settings for "archive" and "spam" folders. See issue 3. 2010-07-04 13:48:06 +00:00
cketti
7adc168471 Added a null pointer check to protect from NullPointerExceptions.
See issue 1749
2010-06-21 18:17:10 +00:00
Jesse Vincent
dcd83f243b For post-2.8 - start at replacing text buttons with image buttons.
better images are desperately needed.
2010-06-10 03:37:23 +00:00
Jesse Vincent
504f1b7e17 Fixed 1597
Switching "Touch-friendly view" option from message list view no longer causes NullPointerException / Force close
2010-06-09 02:45:28 +00:00
Jesse Vincent
366ce15196 Very first pass at contextual search. This _should_ end up as a submenu
with searches for "Same recipient", "In this conversations", "On this
date", etc.
2010-06-06 21:33:44 +00:00
cketti
84d5e7216d Fix a crash when using the back button in a search results list with "Manage Back button" preference enabled.
Fixes issue 1716
2010-06-06 14:47:24 +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
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
a59ade4fdd When no messages are selected yet, "Select all" is the only valid batch
option. Instead of forcing the user through a submenu, show "Select all"
instead of the submenu
2010-05-15 21:03:44 +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
Jesse Vincent
ba021597c4 astyle 2010-05-12 02:51:59 +00:00
Jesse Vincent
1bf1643987 Move Account and Folder settings into a submenu. give access to global
preferences from there, too. - many users never leave their inboxes
making it hard to get up to Settigns
2010-05-12 01:18:12 +00:00
cketti
683f31e32e Code cleanup: Fixed some warnings 2010-05-03 13:46:55 +00:00
cketti
fd26ec475a Show "(No subject)" in the message list for mails without subject. 2010-05-01 23:12:27 +00:00
Daniel Applebaum
ee1b4b70e2 Fixes Issue 1412
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.
2010-05-01 20:06:52 +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
Daniel Applebaum
3f771474c1 Fixes Issue 1477
Keep mSelectedCount in sync with the number of selected messages.
2010-04-27 03:26:54 +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
f185240f67 Make stars and envelopes on folder active. 2010-04-24 19:10:57 +00:00
Daniel Applebaum
a2f4391501 Fixes Issue 1341
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.
2010-04-24 14:59:27 +00:00
Daniel Applebaum
e7e59ef858 Fixes Issue 1450
Fixes Issue 1456

Don't add canned searches to account list if no real accounts exist.

Fix NPE.

Prep work for searching named folders.
2010-04-24 04:35:39 +00:00
Daniel Applebaum
8e0ee1a6e1 Star and envelope are now active for regular accounts. 2010-04-22 04:58:50 +00:00
Daniel Applebaum
41c5dc5986 Fixes Issue 1448
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.
2010-04-22 02:20:35 +00:00
cketti
8ebbc611e9 Fix NullPointerException when using the touch friendly message list. 2010-04-21 00:58:09 +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
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
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
bbedf7b9e0 Fixes Issue 1314 2010-03-13 04:49:15 +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
03a06696dc Pre-r660 we didn't have this line, and things worked better. Also see
Troy Engel's comments in Issue 936.  If this commit isn't
satisfactory, perhaps try Troy's suggestion.

Fixes Issue 936.
2010-02-09 03:34:49 +00:00
Daniel Applebaum
23e5a132d4 Provide title bar display of next polling time 2010-02-09 03:26:40 +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
Jesse Vincent
a9b538fd09 stop views from "resetting" to previous intents on rotate. 2010-02-04 02:38:30 +00:00
Daniel Applebaum
d114fa1bc3 Fixes Issue 1058
Add 's' hotkey for Select/deselect
2010-01-31 15:41:26 +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
Jesse Vincent
7fb17b889e Fix a number of assumptions about accounts in MessageLists.
Fixes Issue 1079
2010-01-24 22:26:21 +00:00
Jesse Vincent
c6058686b3 Fix a crash on swipe in the message list. Thanks to cketti.
Fixes issue 1054
2010-01-20 22:10:10 +00:00
Jesse Vincent
c5fa25151a unselect->deselect 2010-01-19 02:58:17 +00:00
Jesse Vincent
a145d3c616 "Deselect all" -> "Unselect all" (at a code level)
"Deslect all" -> "Done" (at a UI level)
2010-01-19 00:51:02 +00:00
Jesse Vincent
ae029762cf Add a new preference to always show multiselect checkboxes. 2010-01-19 00:43:52 +00:00
Jesse Vincent
23af9f3e6d Guard against fling events that only have one motionevent defined 2010-01-19 00:15:21 +00:00
Jesse Vincent
591ca5bc5e Fix batch operations menu
* Add an explicit configuration option for stars
* Replace now-outdated "left handed" widgets config option, now that
  select widgets are always on the left.
* since the multi-modality of the message list was now only a "toggle
  stars" option, kill that, as it was lots of code and rather redundant
2010-01-17 22:49:03 +00:00
Jesse Vincent
f3275a8473 When we've entered "selection mode" actually make sure we _show_ the
selected-item check mark.
2010-01-17 05:52:22 +00:00
Jesse Vincent
591a3af6dc Eliminate "select" mode in favor of a unified swipe and context menu -based
always-available select action.  For the moment, this means
that widgets_on_left does nothing at all. based on feedback, I may kill
the preference and multi-mode behaviour entirely in favor of "show stars?"
(and possibly "show stars on left"

Stars, "checkboxes" and color bars updated to actually fit in wide mode.
2010-01-17 04:20:39 +00:00
Jesse Vincent
0de7b15aa1 Swipe to select/deselect from touchmode 2010-01-17 04:20:22 +00:00
Daniel Applebaum
64552e2ebe Fixes Issue 977 by correcting defect introduced in r1195. 2010-01-16 16:33:23 +00:00
Jesse Vincent
64469e4b4e ran artistic style against src/com/fsck/k9/ 2010-01-14 01:07:28 +00:00
Jesse Vincent
34379dc9be Improved batch button behavior for touch view 2010-01-14 01:07:13 +00:00
Jesse Vincent
25b9f41491 Don't automatically show the batch buttons when entering multiselect mode 2010-01-14 00:33:13 +00:00
Jesse Vincent
9bfc01ca32 Add a preference for the new "touch friendly" view. 2010-01-13 03:37:13 +00:00
Jesse Vincent
d5c185545b Add a "done" to the batch buttons.
Make the "done" entry in batch buttons only show up in touch mode
2010-01-13 03:37:04 +00:00
Jesse Vincent
6343f3af5a If we're in touch mode and have selected items, any item click is now a select 2010-01-13 03:36:49 +00:00
Jesse Vincent
7ab9b8ee3c Added a first-pass view optimized for high-rez devices with both select and star 2010-01-13 03:36:43 +00:00
Jesse Vincent
23e46b82ce Batch-update buttons now show up when you actually have selected items. 2010-01-13 03:36:30 +00:00
Bao-Long Nguyen-Trong
1c5d240564 Made batch op button's text sensitive to which messages are selected 2010-01-12 19:39:20 +00:00
Jesse Vincent
0bdb02dc24 Minor reformatting 2010-01-09 23:49:44 +00:00
Jesse Vincent
e49fdc9913 Added a comment about why we're setting a click handler 2010-01-09 23:49:36 +00:00
Jesse Vincent
fb223ea61d rename a paremeter to better reflect its use: nextWidget->showWidget 2010-01-09 23:49:31 +00:00
Jesse Vincent
553625b72b Comment an attribute 2010-01-09 23:49:25 +00:00
Jesse Vincent
497ca01586 swap the order of compared values for a bit more logical sanity 2010-01-09 23:25:15 +00:00
Jesse Vincent
5802b84e16 Reorder methods for better logical grouping 2010-01-09 23:25:10 +00:00
Jesse Vincent
9db97e214d Restore Bao-long's original design for "widgets on the left" being a
global config option rather than a per-account one. (But with a new
implementation.) - As we now have views that show messages across
accounts, this needed to become a global)
2010-01-09 23:02:40 +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
a5166e3c2d Fixes Issue 963
MessagingController was calling the MessagingListener twice for
deleted messages.  By the time the second call was made, some
Activities already had removed the message holder, so a null holder
was being put on the list.

This change should prevent the double calls, and adds protection
against have the MessageList MessagingListener called with a message
that is no longer in the MessageList.

Also, some logical cleanups.
2010-01-06 04:54:24 +00:00
Daniel Applebaum
d58d1c60c0 Proper super call 2010-01-04 00:48:33 +00:00
Jesse Vincent
a926911e7f rerun astyle 2010-01-03 01:50:51 +00:00
Jesse Vincent
953b784fb9 First pass at fixing Issue 963 (explosions when trying to iterate over a
remotely deleted message) introduced in r1204.

(Before my all-day meeting)
2009-12-29 17:06:13 +00:00
Jesse Vincent
2ef3b15c87 make sure we don't accidentally open the context menu on a message when we're in multiselect mode. 2009-12-29 17:05:17 +00:00
Jesse Vincent
3e3b4d447d Fix reversed color chip alpha 2009-12-28 12:56:59 +00:00
Jesse Vincent
794f515bc8 Numerous small fixes to search results 2009-12-27 17:22:57 +00:00
Jesse Vincent
0a2d9b9c9f make sure search results aren't updated incorrectly on incoming messages 2009-12-27 17:22:38 +00:00
Jesse Vincent
bfaba499fe Fix the Search header on search results 2009-12-27 17:22:32 +00:00
Jesse Vincent
63b6f6bf62 Refactoring to better propagate "folder" along with messages as they're instantiated 2009-12-27 17:22:26 +00:00
Jesse Vincent
d60521f06f further push down our "is this message for us" logic. 2009-12-27 17:20:56 +00:00
Jesse Vincent
6c7782b4bd remove another alternate calling convention for addOrUpdateMessage. Code
will get still cleaner when we start propagating back message folders as objects
2009-12-27 17:20:50 +00:00
Jesse Vincent
c608ffb672 Eliminate a variant of addOrUpdateMessage that was only called once 2009-12-27 17:20:28 +00:00
Jesse Vincent
1c4a0be0da enable searching of messages 2009-12-27 17:20:21 +00:00
Jesse Vincent
21238a3084 If we get a message from listLocalMessages and we're doing a search,
assume it's for us. Later, we may want to be smarter about that.
2009-12-27 17:20:13 +00:00
Jesse Vincent
a736a4267c Only trigger our "loading" indicator if the account matches "our" account 2009-12-27 17:20:06 +00:00
Jesse Vincent
204289a4ff when opening a message for display or edit, use its notion of account, not the folder's. 2009-12-27 17:19:56 +00:00
Jesse Vincent
f6756879ef Temporarily disable "left-handed" controls if we're doing a search.
view configuration needs to move to be global for this to work right.
2009-12-27 17:19:49 +00:00
Jesse Vincent
bc61c90e1a make the auto-open folder not trigger if we're doing a search 2009-12-27 17:15:46 +00:00
Jesse Vincent
81d72a2d8c make the color chip genuinely calculated per message 2009-12-27 17:15:38 +00:00
Jesse Vincent
ed19a8284e Propagate per-message account info into MessageInfoHolder and FolderInfoHolder 2009-12-27 16:54:23 +00:00
Jesse Vincent
302deea53e addOrUpdateMessage calls now propagate the account of the found message 2009-12-27 16:54:12 +00:00
Jesse Vincent
3ad69c799d When listing off messages, make sure that our "refresh the list" fires,
even if we didn't start off empty.

This could have prevented updated messages from showing up
2009-12-27 16:54:06 +00:00
Jesse Vincent
4cec247699 Make it possible to populate a MessageInfoHolder without a FolderInfoHolder 2009-12-27 16:53:09 +00:00
Jesse Vincent
fe67f0a40c temporarily disable new unfinished search code 2009-12-27 16:53:03 +00:00
Jesse Vincent
0005a8ea60 Remove lies from a comment 2009-12-27 16:52:50 +00:00
Jesse Vincent
54ad16edb8 Push a "is this the right folder?" check into our "add/remove messages from the message list, to better support search 2009-12-27 16:52:45 +00:00
Jesse Vincent
81a5820e5d swap the order of two methods for readability 2009-12-27 16:52:39 +00:00
Jesse Vincent
7c8a7b1f27 Remove an old comment/obsolete code 2009-12-27 16:52:33 +00:00
Jesse Vincent
2a77001acc First steps toward adding search results 2009-12-27 16:52:26 +00:00
Jesse Vincent
9d417133b5 reduce duplication of code 2009-12-27 16:51:38 +00:00
Jesse Vincent
c953ff2c1b Bulletproof MessageList against not having a folder loaded 2009-12-27 16:51:32 +00:00
Jesse Vincent
5c8a0a908c Remove a lie from a comment 2009-12-27 16:51:25 +00:00
Jesse Vincent
5e0bbf18aa Extract parts of title setting code into their own methods 2009-12-27 16:51:19 +00:00
Jesse Vincent
5b907c2d94 Remove an overridden subroutine that's now a noop 2009-12-27 16:51:13 +00:00
Jesse Vincent
c8bcad6a21 Refactor and reverse logic to be a bit cleaner 2009-12-27 16:51:06 +00:00
Jesse Vincent
721e298542 Invert some logic to clean up MessageList a bit 2009-12-27 16:51:00 +00:00
Jesse Vincent
56cdfa88c9 tiny grammar fix 2009-12-27 16:50:44 +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
e82bb72a97 non-downloaded messages once again have a grey background.
Fixes Issue 899
2009-12-20 06:54:30 +00:00
Jesse Vincent
7e967c6110 removed now-unused subject coloring code 2009-12-20 06:54:23 +00:00
Jesse Vincent
b8b9e20e81 Hang onto our messaging controller rather than constantly reacquiring
it.
2009-12-20 06:14:10 +00:00