Commit Graph

243 Commits

Author SHA1 Message Date
cketti 1d28eb003d Added a setting to disable marking messages as read on viewing 2012-03-19 04:44:41 +01:00
cketti 3632978b49 Don't animate the previous/next buttons in message view 2012-02-25 01:08:55 +01:00
cketti 4e12dc154e Save/restore instance state for SingleMessageView 2012-02-24 03:43:42 +01:00
cketti 4984a6b9e5 Keep current view state after having downloaded the complete message
If the attachment view was visible, keep it that way.
2012-02-22 23:07:48 +01:00
cketti 2b54599c2b Small code cleanup 2012-02-22 22:56:05 +01:00
cketti 0ef9c516be Moved click listener from MessageView to SingleMessageView 2012-02-22 22:44:31 +01:00
cketti d44849d239 Restored previous/next animations 2012-02-21 16:54:35 +01:00
cketti 9f42ff61d3 Removed settings for scrolling buttons 2012-02-21 15:16:36 +01:00
cketti 309eeb72ac Got rid of the ScrollView in MessageView
The ScrollView around the WebView caused all sorts of problems. This
change removes the ScrollView and uses the undocumented method
WebView.setEmbeddedTitleBar() to set the MessageHeader view as "title
bar" of the WebView. This allows MessageHeader to scroll away making
more room for the WebView.
All of the "magic title bar" code was originally implemented by Jesse
for Kaiten.

Because WebView doesn't support a scrolling footer we can no longer
support scrolling buttons or attachments at the end of the message. Now
users can switch from message view to attachment view via a button just
below the message headers.

I also copied some code for which I was too lazy to create a separate
commit. It allows to display attachments we didn't use to show by
clicking on a "More..." button in the attachment view. Those
attachments are mostly images referenced by the HTML part (e.g.
background images).

Fixes issue 3291
2012-02-21 05:07:01 +01:00
cketti 898f65e081 Changed the way we set flags to update the original Message object 2012-02-04 21:06:34 +01:00
cketti b1a1de8f7b Restore mark as unread in message view
Fixes issue 3958
Fixes issue 3319
2012-01-27 08:39:10 +01:00
cketti fec6434f08 Removed unused code 2012-01-04 03:57:54 +01:00
cketti 71174417ce Clone Message object to avoid ConcurrentModificationExceptions
Fixes issue 3953
2012-01-04 03:57:53 +01:00
cketti 50058a92db Fixed "managed" back button behavior in MessageView 2011-12-05 18:16:43 +01:00
cketti 73edf5c31a Fixed problem with back button because of custom dispatchKeyEvent() 2011-11-20 21:29:18 +01:00
Koji Arai d82d0a220c Fixed Issue 3850. Revert part of the onBackPressed() magic to back from MessageView.
At least, this code still needed on android.os.Build.VERSION.SDK_INT == GINGERBREAD_MR1.
2011-11-17 22:52:35 +09:00
cketti fe727f8b20 Merge pull request #98 from cketti/remove_legacy_code
Remove legacy code
2011-11-15 20:07:23 -08:00
ashley willis 3ffb5021e1 Option to have confirmation on deleting starred messages. 2011-11-15 00:28:41 -06:00
cketti 14ff4d006e Removed onBackPressed() magic 2011-11-10 05:38:52 +01:00
Andrew Chen ef631e21d1 Merge pull request #83 from andrewachen/messageview_save_location
Restore position in MessageView after rotation screen.
2011-11-07 09:57:18 -08:00
cketti e2e9f8b6a3 Fixed startActivityForResult() failing for MessageList
Fixes issue 3638
2011-11-07 00:07:06 +01:00
Andrew Chen f6eea9f014 Move the listener logic out of the Activity and into the View.
Change variable naming in ToggleScrollView to meet standard.
Cache the result of computeVerticalScrollRange() in ToggleScrollView.
2011-11-03 09:14:42 -07:00
Andrew Chen 763ff2752d Scroll to the last known position in the MessageView when rotating the screen. 2011-11-02 16:39:23 -07:00
Andrew 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
ashley willis 2058fc378d Option to show next message after delete by default instead of previous. 2011-10-12 17:50:24 +02:00
cketti f6a647d7b0 Cosmetic changes 2011-08-31 02:17:45 +02:00
cketti e9e9d5afcb Removed unused method 2011-08-31 02:12:01 +02:00
Koji Arai 8d264b159e Workaround for below issue.
1. Show a message in MessageView.
2. Press HOME button to back home.
3. Re-launch the K-9 and select another message.
4. Show first selected message.

See also: https://github.com/k9mail/k-9/commit/fix_activity_stack
2011-07-18 00:59:30 +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 5ee63c47fe Implemented BACK handling for MessageView
Implemented because MessageList is now in singleInstance launchMode so
the default behavior may not match user options.
2011-06-08 08:42:40 +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
Marcus Wolschon e0ef94f64b Issue 3319: unseen message count can add up to infinity 2011-05-09 11:21:24 +02:00
Bernhard Redl ab4bae214f Make attachment saving respect the new preference. Allow long-press to
choose a folder.

(new constant renamed from CHOOSE_FOLDER to CHOOSE directory for
clarity)
2011-04-24 14:01:03 +10:00
Jesse Vincent 0174988d27 astyle 2011-04-12 22:16:22 +10:00
cketti aa4c970baa Added "move to spam folder" confirmation dialog to MessageList 2011-04-01 04:21:27 +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
Jesse Vincent e19162cb86 ant astyle 2011-03-22 18:07:47 +11:00
cketti d354905f21 Cosmetic changes 2011-02-20 19:18:17 +01:00
Jan Berkel 41378188f9 Updates to the view need to happen on the UI thread
Fixes downloading attachments (would just fail silently)

  Also added a ProgressDialog since progress() just asks for
  progress to displayed in the title bar. Since there is no title bar,
  no progress is shown at all.
2011-02-20 18:49:55 +01:00
cketti a79b7ea93c Inlined methods that were extracted to use
@SuppressWarnings("unchecked"). That's now unnecessary after the
Serializable -> Parcelable switch
2011-02-20 06:23:06 +01:00
cketti bb40049212 Remove unused imports 2011-02-20 05:31:35 +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 8a778a0222 reformatting 2011-02-14 20:45:08 -05:00
Jesse Vincent fb663508e0 remove an unused method 2011-02-14 20:44:53 -05:00
Jesse Vincent 143ca4df26 replace redundant calls with a helper 2011-02-14 20:26:00 -05:00
Jesse Vincent ea6e5e0e62 Lifting more of the "Show this message" over to the SingleMessageView 2011-02-14 13:40:49 -05:00
Jesse Vincent dc1444d1ac Rename a method that was confusingly similar to another method 2011-02-14 13:32:30 -05:00
Jesse Vincent 10da146e93 clean up unused imports 2011-02-14 13:32:25 -05:00
Jesse Vincent 5aad882976 Move the "isScreenReader" active code down into the MessageView 2011-02-14 13:32:14 -05:00