When MessageListFragment is on the back stack and the device is rotated
the instance state will be restored but no new view will be created. If
the device is rotated again onSaveInstanceState() is called and we have
to take care not to assume that the views have been created.
Remove the fadeout to make things look a little less weird
Make the animations slide in from the edge. (See the aforementioned comment about jankyness)
TODO: don't remove the message view until _after_ the animation runs. Before HC, that requires rather a lot more code (writing a whole animationadapter) than it should.
TODO: get the messageview to stop jumping to hide the header area as it's displayed.
- Since the split-view change, MessageView is only a fragment, so we
can't call setTheme() anymore so easily.
Instead, use a ContextThemeWrapper and use that to inflate the
layout. This way the message header and attachment view
are styled correctly.
- The HTC WebView fix in SingleMessageView was returning the wrong
background color, when message view theme and global theme differ,
because it always used the global theme to retrieve it.
Fix: Specifically put the light/dark values in the themes.xml,
and get them using getContext().getTheme().resolveAttribute().
getContext() will use the ContextThemeWrapper from above, so
even if the global and message view themes differ, it aleays
returns the correct one.
The getThemeBackgroundColor() method added to the K9ActivityMagic
interface in 309eeb72ac is now not
needed anymore, and was removed.
Some people prefer them over swiping / volume keys.
They could probably be made optional so they can be hidden.
Also: delete the now unused message_view_fragment.xml and message_view_option.xml.
Calling configureMenu() inside updateMenu() doesn't update the
buttons properly. Instead, call invalidateOptionsMenu(). This forces
the menu to be re-created, and onPreareOptionsMenu() to be called.
From there, configureMenu() is called automatically.
The commit that introduced those notifications also introduced a rather
... interesting design pattern: The CertificateValidationException
notified the user of its pure existance - it's no longer a 'message'
only, but defines policy. As this is more than unusual, replace this
pattern by the MessagingController treating
CertificateValidationException specially when accessing remote folders.
Also make clear which account failed when constructing the notification.
The previous code worked fine on Android 4.2. But the lifecycle on older
Android versions (tested with 2.2) seems to be slightly different. This
should fix the problem.
- show thread as starred if at least one message in it is starred
- use arrival date of last message as thread arrival date
- use sum of message attachment counts in thread as thread attachment
count
- show thread as answered/forwarded if all messages in thread were
answered/forwarded