Commit Graph

164 Commits

Author SHA1 Message Date
cketti 672a85bcf4 Fix crashes when selecting messages in the message list
Throughout the code we make the assumption that onPrepareActionMode() is
called right after starting the action mode. However, this is not the case on
Android 5.1.
With this change we call ActionMode.invalidate() right after starting the
action mode which causes onPrepareActionMode() to be invoked.
2015-03-14 11:58:05 +01:00
Art O Cathain d38f21265d use isEmpty instead of size() == 0 for clarify 2014-10-05 10:37:50 +01:00
Art O Cathain 02c0b5f2a3 Use collections instead of arrays to enable stronger typing and reduce cruft 2014-10-05 10:37:36 +01:00
Art O Cathain 203dcfe2c3 use interfaces, not implementions 2014-10-04 12:00:48 +01:00
Christian Frommeyer 91ef5fa816 Extracted LocalFolder and LocalMessage definition from LocalStore 2014-09-11 20:26:40 +02:00
Christian Frommeyer 038fceabf0 Move LocalStore to new subpackage to prepare decomposition of nested
classes.
2014-09-11 20:26:39 +02:00
Joe Steele e4d26b8c75 Remove code for unsupported API levels
An assortment of miscellaneous changes, each usually limited in scope to a
single file.
2014-08-19 17:17:55 -04:00
cketti ba69b3a647 Remove ActionBarSherlock 2014-06-21 17:09:45 +02:00
cketti 082e13df26 Add support for delete confirmation in message list
Fixes issue 6260
2014-05-18 20:21:33 +02:00
Joe Steele 00a60a0f4f Clean up lint items
Eliminate unused variables/fields/imports
2014-05-03 12:51:37 -04:00
Koji Arai 615a1ae9a7 Remove duplicate code. use Utility.hasConnectivity() 2014-04-28 15:36:07 +09:00
Miltos Allamanis 6075addfd0 Renamed "local_folder" to "localFolder".
The naturalize tool detected that using "localFolder" is more consistent
with the current codebase state:
* "localFolder" in MessageListFragment is 76.31% probable ("local_folder" 23.69%)
2014-02-26 14:49:06 +00:00
cketti 70399829c2 Fix indentation and code style 2014-02-17 19:58:22 +01:00
András Veres-Szentkirályi 7ae3a15d7c converted for to for-each loop with short circuit evaluation 2014-02-15 23:59:23 +01:00
András Veres-Szentkirályi 309a4d6107 Use more efficient entrySet iterator instead of keySet + get()
The loop extracted keys from `folderMap` and then called
`folderMap.get(...)` for every key. If both the key and the value needs
to be iterated on, `Map.entrySet()` is a more efficient solution as it
doesn't require O(n) Map lookups.
2014-02-15 23:58:26 +01:00
András Veres-Szentkirályi 28398dbdad removed unnecessary unboxing followed by reboxing
Since id is a Long, Long.valueOf(long) unboxed the Long to a primitive
long, then reboxed it into a Long instance, which was again unboxed to
allow it to be set as an element of the array of longs. This commit
reduces the number of boxings from 3 to 1.
2014-02-15 21:33:08 +01:00
cketti f24c298791 Disable pull-to-refresh when remote search is not allowed
Fixed issue 6151
2014-01-22 16:06:52 +01:00
Joe Steele 313a5bff9c Contact picture fix.
Clear out old/unrelated (previously bound) contactBadge info in
MessageListAdapter.bindView that could otherwise be displayed
when tapping on a contactBadge with no counterpartyAddress (may
require scrolling the message list up and down first before the
bug becomes evident).
2013-10-11 11:24:53 -04:00
Danny Baumann 890e0e22e3 Some assorted warning fixes. 2013-09-25 15:20:43 +02:00
Jesse Vincent 818c5c910d Fix flagging of messages in message list 2013-08-27 16:08:05 -04:00
Jesse Vincent 7ba68dbc3c update the new message list item to work better in various odd configurations 2013-08-22 21:08:51 -04:00
Jesse Vincent 99e354bc9f Add back select/deselect action to return it to the context menu where users keep looking 2013-08-22 20:56:56 -04:00
Jesse Vincent cef82a5cc3 move thread count up to the subject line 2013-08-22 20:56:56 -04:00
Jesse Vincent a8668f962d add back stars to the message list UI 2013-08-22 20:56:55 -04:00
Jesse Vincent b2cfc40ab6 Fixes for showing the selected checkbox correctly 2013-08-22 20:56:55 -04:00
Jesse Vincent ee234b65f8 Return to old style chips for accounts, folders and messages.
My circle design stopped being even a little bit useful when we stopped showing
the "complex" versions of the shapes
2013-08-22 20:56:55 -04:00
cketti 20fcd6f63d Add setting to toggle colored background of fallback contact pictures 2013-08-16 18:43:00 +02:00
Jesse Vincent 2ba84bceaa Merge pull request #353 from sfuhrm/gmail-style-user-pics
Gmail style user pics, 2nd try

* sfuhrm/gmail-style-user-pics:
  Changed the fallback char from 'K' to '?'. The riddler was here ;).
  Using Android proposed colors as contact color palette now: http://developer.android.com/design/style/color.html
  Fixed NPE found by blackbox87 ... thanks pal!
  Added more finer characters as proposed by cketti
  Caching also the calculated anonymous bitmap as proposed by maniac103. This removes a lot of code for special handling unknown contacts.
  Bugfix for negative modulo result indexing the palette array
  Changed hash based color calc to a hash indexed palette as discussed in the pull request.
  GMail-app-style generated colorful one-letter contact pictures for pictureless contacts

Conflicts:
	src/com/fsck/k9/activity/misc/ContactPictureLoader.java
	src/com/fsck/k9/fragment/MessageListFragment.java
2013-07-30 22:00:19 -04:00
Jesse Vincent bbad298bf6 Convert OpenMode from an Enum to static ints for perf improvement.
(Based on profiling of long folder list opens)

This should be backported to 4.4
2013-07-30 21:32:35 -04:00
Stephan Fuhrmann 393f45bda1 Fixed NPE found by blackbox87 ... thanks pal! 2013-07-30 21:27:52 +02:00
Stephan Fuhrmann 16f6d85ea2 GMail-app-style generated colorful one-letter contact pictures for pictureless contacts 2013-07-21 14:34:45 -04:00
Stephan Fuhrmann 3feaeb6903 GMail-app-style generated colorful one-letter contact pictures for pictureless contacts 2013-07-21 16:58:38 +02:00
Jesse Vincent 6c3fb46541 only show the super-condensed layout if the contact picture is not being displayed. 2013-07-21 09:20:40 -04:00
Jesse Vincent 86ec4b32e9 restore super-dense layout when the user has selected 0 lines of message preview 2013-07-20 14:53:39 -04:00
cketti 82c0a92049 Fix actions started from the message list context menu
This patch makes sure actions started via the context menu operate on
the correct message even when the message list changes and the 'adapter
position' accessible via the menu object points to another message.
When the message the menu was opened for is deleted the context menu
will be closed.
2013-07-04 02:59:00 +02:00
cketti cb906ee6a4 Use the color chip area as click target for the multi-select checkboxes 2013-06-07 07:12:23 +02:00
cketti f16082eab3 Always include currently opened message in the message list
This should fix various bugs where moving to the next/previous message
didn't work.
2013-05-23 17:15:09 +02:00
cketti edf75ec05a Fix crash on search with multiple accounts set up 2013-05-05 03:03:40 +02:00
cketti c7024af9a1 Merge branch 'message-list-sender-sorting' 2013-04-26 02:39:48 +02:00
cketti 99daa4068f Merge branch 'better_singleaccount_check' 2013-04-26 02:37:19 +02:00
cketti 8c8e0d299d Fix copyOrMove() so it works for single messages in Unified Inbox 2013-04-23 19:25:05 +02:00
cketti 8f9dd78012 Always enable "pull to refresh" when "check mail" action is shown 2013-04-23 18:55:24 +02:00
cketti 0d80dd8fe1 Avoid another NPE 2013-04-18 05:49:18 +02:00
dzan 33cf1bc222 If messagelist started from Unified localsearch, verify if we are really dealing with multiple accounts. If not then set SingleAccountMode anyway. 2013-04-14 14:47:45 +02:00
cketti 175e29b71d Make status display less awkward when checking mail from Unified Inbox
We really need to fix the ActivityListener madness :(
2013-04-03 03:08:06 +02:00
cketti c5dc626bbc Show "check mail" action when displaying Unified Inbox etc. 2013-04-02 21:47:20 +02:00
cketti 0c5bdf2c97 Add "Mark all as read" action to message list 2013-04-02 19:17:58 +02:00
cketti 9d7eae252e Avoid NullPointerException 2013-04-02 04:02:25 +02:00
cketti ce0308f528 Avoid NullPointerException in SubjectComparator 2013-03-31 00:48:01 +01:00
cketti c4799d20f0 Fix condition on when to show "check mail" in POP3 accounts 2013-03-31 00:24:28 +01:00