Adapt swipe navigation to reading direction

pull/162/head
M66B 5 years ago
parent 5286287b73
commit f136ffdf91

@ -224,6 +224,7 @@ FairEmail follows all the best practices for an email client as decribed in [thi
* [(128) How can I reset asked questions, for example to show images?](#user-content-faq128)
* [(129) Is ProtonMail supported?](#user-content-faq129)
* [(130) What does message error ... mean?](#user-content-faq130)
* [(131) Can you change the direction for swiping to previous/next message?](#user-content-faq131)
[I have another question.](#user-content-support)
@ -2188,6 +2189,8 @@ ProtonMail uses a proprietary email protocol
and [does not directly support IMAP](https://protonmail.com/support/knowledge-base/imap-smtp-and-pop3-setup/),
so you cannot use FairEmail to access ProtonMail.
<br />
<a name="faq130"></a>
**(130) What does message error ... mean?**
@ -2203,6 +2206,18 @@ The error will almost always include a reason. Common reasons are that the messa
Please see [here](#user-content-faq22) for other error messages in the outbox.
<br />
<a name="faq131"></a>
**(131) Can you change the direction for swiping to previous/next message?**
If you read from left to right, swiping to the left will show the next message.
Similarly, if you read from right to left, swiping to the right will show the next message.
This behavior seems quite natural to me.
<br />
## Support
If you have another question, want to request a feature or report a bug, you can use [this forum](https://forum.xda-developers.com/android/apps-games/source-email-t3824168).

@ -944,6 +944,8 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
if (swipenav) {
Log.i("Swipe navigation");
boolean ltr = (getContext().getResources().getConfiguration().getLayoutDirection() == View.LAYOUT_DIRECTION_LTR);
final SwipeListener swipeListener = new SwipeListener(getContext(), new SwipeListener.ISwipeListener() {
@Override
public boolean onSwipeRight() {
@ -951,7 +953,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
Animation bounce = AnimationUtils.loadAnimation(getContext(), R.anim.bounce_right);
view.startAnimation(bounce);
} else
navigate(previous, true);
navigate(previous, ltr);
return (previous != null);
}
@ -962,7 +964,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
Animation bounce = AnimationUtils.loadAnimation(getContext(), R.anim.bounce_left);
view.startAnimation(bounce);
} else
navigate(next, false);
navigate(next, !ltr);
return (next != null);
}

Loading…
Cancel
Save