From 7b0082026c6a37c99bf7e8de2e3e274191ac4e8a Mon Sep 17 00:00:00 2001 From: Joe Steele Date: Sat, 23 Mar 2013 16:36:51 -0400 Subject: [PATCH] Revert auto-scroll changes that are no longer needed. Revert "Only Jelly Bean seems to have the auto-scroll issue" This reverts commit a3802a7a8eece86f31070868f9ba7c9c7b23f92e. Revert "Hack around WebView's initial auto-scrolling past the message header" This reverts commit 8dcc769c50ab4cfb7c5b8f8f9b5bed3fd28801c2. Conflicts: src/com/fsck/k9/view/MessageWebView.java --- src/com/fsck/k9/view/MessageWebView.java | 25 ------------------------ 1 file changed, 25 deletions(-) diff --git a/src/com/fsck/k9/view/MessageWebView.java b/src/com/fsck/k9/view/MessageWebView.java index 47dafeb2c..73cbbd334 100644 --- a/src/com/fsck/k9/view/MessageWebView.java +++ b/src/com/fsck/k9/view/MessageWebView.java @@ -49,9 +49,6 @@ public class MessageWebView extends WebView { } - private int mOverrideScrollCounter; - - public MessageWebView(Context context) { super(context); } @@ -188,7 +185,6 @@ public class MessageWebView extends WebView { content += HtmlConverter.cssStylePre(); content += "" + text + ""; loadDataWithBaseURL("http://", content, "text/html", "utf-8", null); - mOverrideScrollCounter = 0; } /* @@ -207,25 +203,4 @@ public class MessageWebView extends WebView { } } - @Override - public void scrollTo(int x, int y) { - if (Build.VERSION.SDK_INT >= 16 && mOverrideScrollCounter < 3) { - /* - * 2013-03-12 - cketti - * - * WebView on Android 4.1+ automatically scrolls past the title view using this method. - * It looks like user-triggered scroll operations don't call this method. So we use - * it to override the initial scrolling past the title view. - * - * It's a dirty hack and we should find a better way to display the message header. When - * testing this I saw up to two calls to this method during initialization. To make - * sure we don't totally cripple the WebView when the implementation changes we only - * override the first three scrollTo() invocations. - */ - y = 0; - mOverrideScrollCounter++; - } - - super.scrollTo(x, y); - } }