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

488 Commits

Author SHA1 Message Date
cketti
cec2f4cdee Use "display name" of folder in action bar 2012-09-09 13:21:15 -07:00
cketti
9301e94e73 Show as much of the folder name as possible in the navigation spinner 2012-09-09 13:18:10 -07:00
cketti
2b49338112 Removed trailing spaces (no functional changes) 2012-09-09 13:16:07 -07:00
Sander Bogaert
592aeb0b03 Add forward, reply, reply all, same sender back in the MessageList context actionbar. 2012-09-09 13:13:39 -07:00
Sander Bogaert
f530af7f8b Make the icon up navigation work in messagelist when displaying a query, tapping it takes you back to the account screen. 2012-09-09 13:13:38 -07:00
Sander Bogaert
65505c8145 Remove customview from top bar and make bottom refresh function in MessageList. 2012-09-08 22:26:30 -07:00
Sander Bogaert
9c9763154e Abbriviate long foldernames. 2012-09-08 22:23:38 -07:00
Sander Bogaert
9f568e3e08 Hide move & copy options for mixed messagelists. Also use hide and show the new grouped icon for them correctly. 2012-09-08 22:21:13 -07:00
Sander Bogaert
85fc76c10b Have the icon function as 'up' instead of 'home'. 2012-09-08 22:21:10 -07:00
Sander Bogaert
4a7a61bd08 Made the selectAll working again. This also got rid of the 2 settings options in the actionbar. 2012-09-08 22:21:06 -07:00
cketti
f46f733bce Moved ActionBarNavigationSpinner to another package 2012-09-08 22:21:05 -07:00
cketti
933a8fdcd5 Made actionbar_selected a format string 2012-09-08 22:21:04 -07:00
cketti
763e2853d7 Whitespace fixes 2012-09-08 22:19:56 -07:00
Sander Bogaert
33cae2fdab Fixed actionbar context mode bug when rotating the screen. 2012-09-08 22:16:03 -07:00
Sander Bogaert
f11e3d5059 Have a nice title for messagelist displaying a query. 2012-09-08 22:16:03 -07:00
Sander Bogaert
a730e67514 Have a dynamic context actionbar filled with options that are supported by the current selection of mails. Also works for unified inbox. 2012-09-08 22:13:07 -07:00
Sander Bogaert
35e8937b8a Remove send alternate option from messagelist activity. 2012-09-08 22:13:06 -07:00
Sander Bogaert
24d7416e61 Implemented the (Un)start and (Un)read toggles. 2012-09-08 22:13:06 -07:00
Sander Bogaert
6bea2dddac Major cleanup of the MessageList activity and layout. Removed dead code. 2012-09-08 22:10:21 -07:00
Sander Bogaert
876bd52e8d Exiting context mode after batch actions. 2012-09-08 22:07:18 -07:00
Sander Bogaert
e01232a500 Selection with context actionbar working. 2012-09-08 22:05:41 -07:00
cketti
f8bd9e481c Converted MessageList to a K9ListActivity 2012-09-08 21:47:52 -07:00
Sander Bogaert
ee6bd2dc22 Pressing the actionbar icon will take you back to the accountsscreen. 2012-09-08 21:43:08 -07:00
Sander Bogaert
67b4cd9c8e Add unread count to MessageList title 2012-09-08 21:43:08 -07:00
Sander Bogaert
6c27d3e7ef Fix the upper refresh button in MessageList 2012-09-08 21:40:56 -07:00
Sander Bogaert
18748499af Generalize ActionBarNavigationSpinner creation. 2012-09-08 21:39:42 -07:00
Sander Bogaert
4de06915ea Make title changeable. Have email adress and foldername in there. 2012-09-08 21:36:47 -07:00
Sander Bogaert
03cec1ef56 Separated the navigationspinner and the messagelist class. 2012-09-08 21:34:33 -07:00
Sander Bogaert
c2af640891 Messagelist special cases bug fix. 2012-09-08 21:32:54 -07:00
Sander Bogaert
2ec97235ec Split bar on Messagelist activity and some code styling. 2012-09-08 21:32:54 -07:00
Sander Bogaert
4293914855 Initial actionbar integration. On top of every activity, no real integration yet. 2012-09-08 21:14:55 -07:00
cketti
f42943f30c Optimized searching for a message in the message list 2012-09-06 22:33:22 +02:00
cketti
9c335127e2 Code cleanup 2012-09-05 03:50:02 +02:00
cketti
16ab1b67bc Made sure the message list is only modified from the UI thread 2012-09-05 03:02:22 +02:00
cketti
d97da517fa Rewrote code accessing mAdapter.messages from outside MessageListAdapter 2012-09-05 01:31:09 +02:00
cketti
fb6d004692 Don't use MessageListHandler when calling from the UI thread 2012-09-05 01:02:05 +02:00
cketti
bd9b6aea2d Moved methods modifying the message list to MessageListAdapter 2012-09-05 00:51:04 +02:00
cketti
75a97a82c0 Make MessageListHandler a real Handler that uses Android's message queue 2012-09-05 00:35:43 +02: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
66911a0624 Use grey background for read messages in the message list 2012-08-15 04:14:12 +02:00
Sander Bogaert
ee283c0c77 Give star a bit more room so there is no cut-off. Don't force the scrollbar on the outside so the listitems can take the whole width. 2012-08-03 12:18:12 -04:00
cketti
411117b660 Removed unused imports 2012-07-07 14:26:16 +02:00
András Veres-Szentkirályi
dd5ab2c2c6 combined nested if statements in MessageList.removeMessages() 2012-07-06 14:34:57 +02:00
András Veres-Szentkirályi
8c3b64c3d7 removed unused private fields gesture{Detector,Listener} 2012-07-06 14:04:19 +02:00
cketti
ea902ce680 Merge onToggleSortAscending() with changeSort() to avoid code duplication 2012-05-16 20:35:56 +02:00
cketti
c64c14c4a6 Use account sort settings when filtering messages of only one account
This will use the account settings when viewing e.g. only the unread
messages in a folder.
2012-05-16 20:35:55 +02:00
cketti
6d19d9c829 Save sort type and sort order for search views (e.g. Unified Inbox) 2012-05-16 20:35:55 +02:00
m0viefreak
022940d4f5 Fix gesture detection
This commit addresses 2 issues:

1) Before, a general GestureDetector was registered on the highest level in K9Activity
   This resulted in EVERY inherited activity to have a useless, unused gesture detector.
   But more than that, in MessageList, a second GestureDetector was assigned to the ListView.
   On every fling gesture, both detectors called the onSwipe() methods,
   which technically did the following:
   - The one directly assigned to the ListView would work corectly by mapping the
     (local) event coordinates to the right entry in the ListView
   - The global one worked on screen coordinates, so the onSwipe() method would
     likely select the wrong ListView entry (system menu bar offset).
   - For some reason this "worked" fine, and only the correct entry was selected,
     despite two detectors used.

2) The gesture detection for the MessageView caused problems when the message
   itself was scrollable, i.e. wide HTML mails. A fling gesture inside the WebView
   would scroll the message, but also switch the message.

This commit fixes all those by doing the following:
- Don't register the GestureDetector in K9Activity, instead make the member variable
  accessible by subclasses.
- In the subclasses that need a detector register it
- In K9Activity.dispatchTouchEvent() check for mGestureDetector being null
- For MessageList:
  * Remove the duplicate gesture detector assigned to the ListView
  * in the handleSwipe() methods: calclulate pixel offset of the ListView to make
    it work using the global screen coordinates
- For MessageView: Limit sensitive area to the message header, to prevent interference
  with the WebView scrolling
- Respect current behavior:
  * Force-enable gestures for the MessageList
  * Respect user setting in MessageView
- Make sure that after a successful swipe gesture, any pending action is cancelled, to
  prevent unwanted things to happen (such as expanding the header after changing
  the message, or a context menu popping up in the MessageList).
  See http://code.google.com/p/android/issues/detail?id=8497
2012-05-01 03:00:15 +02:00
cketti
5d080b656d Fixed a NullPointerException for the context menu in the Unified Inbox 2012-04-30 16:12:14 +02:00
Andrew Chen
32ae7bad9c Migrate to Account.has(Special)Folder() methods. 2012-04-17 08:23:22 -07:00
ashley willis
93de6cdafe fixed issue with sort not being remembered at all on unified inbox / all messages (still does not save sort to settings). 2012-04-12 21:12:22 -05:00
ashley willis
f0c22510e2 fixed FC when changing sort from unified inbox and all messages.
the new sort saves per account, and there is no active account for these folders.
so also, there is no saving of the sort for the unified inbox nor all messages.
2012-04-11 00:08:49 -05:00
Yaroslav Halchenko
4288789e39 BF: mAccount must not be accessed before verfied to be non-null
otherwise obviously leads to crashes.
IMHO this was a logical location to move, and it resolved my issue when
account was not yet accessible due to not yet accepted key upon importing
old settings from a stored file
2012-04-10 22:26:49 -04: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
dd0ba7640c Switch the sort order code around so it saves when reversing sort with a keyboard 2012-04-07 17:11:32 -04: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
Andrew Chen
50b2056454 Always hide the batch archive button in a search view, consistent with the batch ops menu. 2012-04-06 16:46:04 -07:00
Andrew Chen
42d6462946 Hide the batch archive button preference if none of our accounts have an archive folder.
Hide the batch archive button in the MessageList if none of the visible account(s) have an archive folder.
2012-04-06 15:52:56 -07:00
Andrew Chen
e94db81ecb Add Account.hasArchiveFolder() method. 2012-04-06 14:45:44 -07:00
Andrew Chen
3e03120a73 Merge branch 'master' of https://github.com/mnb20/k-9 into pull111
* 'master' of https://github.com/mnb20/k-9:
  High DPI version of archive button icon
  Fixed whitespace
  Remove TODO
  Replaced archive icon. Still a bit crap, but better than my previous attempt.
  Added batch buttons for Archive and Move. Made batch buttons configurable.
2012-04-06 13:47:55 -07:00
Srinath Warrier
7a9ba4e0ad Create implicit sort remembering setting2(minor indentation error) 2012-03-12 22:55:31 +05:30
Srinath Warrier
3ebd3c1fc2 Create implicit sort remembering setting 2012-03-12 22:04:10 +05:30
ashley willis
f9a30d1822 added sort by arrival option. 2012-03-11 17:48:56 -05:00
Srinath Warrier
ff6e1f6c85 Create default sort setting by preference 2012-03-04 16:20:37 +05:30
cketti
1af5476b96 Hide refile batch actions in the message list for POP3 accounts 2012-02-25 04:19:27 +01:00
wilian-cb
02b07f34a1 Issue 3280: Add launcher shortcuts for special accounts/folders ("Unified Inbox" and "All messages") 2012-02-10 00:24:32 -06:00
cketti
898f65e081 Changed the way we set flags to update the original Message object 2012-02-04 21:06:34 +01:00
cketti
0625e13380 Canceling notifications once should be enough 2012-01-20 23:32:55 +01:00
cketti
a8f91b0f70 Minor code cleanup 2012-01-20 23:32:12 +01:00
wcb
457e65010e Issue 3139: notifications of new messages removed when unified inbox is selected 2012-01-20 11:55:04 -08:00
cketti
8e627834c1 Changed font size unit from DIP to SP
"Scale-independent Pixels - this is like the dp unit, but it is also
scaled by the user's font size preference. It is recommend you use this
unit when specifying font sizes, so they will be adjusted for both the
screen density and the user's preference." - Android Developer Docs
2012-01-12 02:18:41 +01:00
cketti
0aa513429a Show/hide ListView footer depending on message list type
Fixes issue 3946
2011-12-31 02:24:54 +01:00
Mark Baker
09c6cfb6e4 Remove TODO 2011-12-29 09:56:54 +00:00
Mark Baker
af1b9f83f2 Added batch buttons for Archive and Move. Made batch buttons configurable. 2011-12-24 18:17:12 +00:00
cketti
50058a92db Fixed "managed" back button behavior in MessageView 2011-12-05 18:16:43 +01:00
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