From 098851684f161cde8548b8f4f0f8c16f9f852f3a Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Sun, 23 Jan 2011 00:56:01 +0000 Subject: [PATCH] astyle --- src/com/fsck/k9/activity/ChooseFolder.java | 85 ++++++++++++---------- src/com/fsck/k9/view/ToggleScrollView.java | 6 +- 2 files changed, 49 insertions(+), 42 deletions(-) diff --git a/src/com/fsck/k9/activity/ChooseFolder.java b/src/com/fsck/k9/activity/ChooseFolder.java index 0dd0d1ffd..843e87035 100644 --- a/src/com/fsck/k9/activity/ChooseFolder.java +++ b/src/com/fsck/k9/activity/ChooseFolder.java @@ -342,48 +342,53 @@ public class ChooseFolder extends K9ListActivity }); mAdapter.setNotifyOnChange(false); int selectedFolder = -1; - try { - mAdapter.clear(); - int position = 0; - for (String name : localFolders) - { - if (K9.INBOX.equalsIgnoreCase(name)) - { - mAdapter.add(getString(R.string.special_mailbox_name_inbox)); - heldInbox = name; - } - else if (!K9.ERROR_FOLDER_NAME.equals(name)) - { - mAdapter.add(name); - } + try + { + mAdapter.clear(); + int position = 0; + for (String name : localFolders) + { + if (K9.INBOX.equalsIgnoreCase(name)) + { + mAdapter.add(getString(R.string.special_mailbox_name_inbox)); + heldInbox = name; + } + else if (!K9.ERROR_FOLDER_NAME.equals(name)) + { + mAdapter.add(name); + } - if (mSelectFolder != null) - { - /* - * Never select EXTRA_CUR_FOLDER (mFolder) if EXTRA_SEL_FOLDER - * (mSelectedFolder) was provided. - */ + if (mSelectFolder != null) + { + /* + * Never select EXTRA_CUR_FOLDER (mFolder) if EXTRA_SEL_FOLDER + * (mSelectedFolder) was provided. + */ - if (name.equals(mSelectFolder)) - { - selectedFolder = position; - } - } - else if (name.equals(mFolder) || - (K9.INBOX.equalsIgnoreCase(mFolder) && K9.INBOX.equalsIgnoreCase(name))) - { - selectedFolder = position; - } - position++; - } - } finally { - mAdapter.setNotifyOnChange(true); - runOnUiThread(new Runnable() { - public void run() { - // runOnUiThread( - mAdapter.notifyDataSetChanged(); - } - }); + if (name.equals(mSelectFolder)) + { + selectedFolder = position; + } + } + else if (name.equals(mFolder) || + (K9.INBOX.equalsIgnoreCase(mFolder) && K9.INBOX.equalsIgnoreCase(name))) + { + selectedFolder = position; + } + position++; + } + } + finally + { + mAdapter.setNotifyOnChange(true); + runOnUiThread(new Runnable() + { + public void run() + { + // runOnUiThread( + mAdapter.notifyDataSetChanged(); + } + }); } mHandler.dataChanged(); diff --git a/src/com/fsck/k9/view/ToggleScrollView.java b/src/com/fsck/k9/view/ToggleScrollView.java index ba348e9c5..ed70d55bc 100644 --- a/src/com/fsck/k9/view/ToggleScrollView.java +++ b/src/com/fsck/k9/view/ToggleScrollView.java @@ -31,7 +31,8 @@ public class ToggleScrollView extends ScrollView @Override public boolean onInterceptTouchEvent(MotionEvent ev) { - if(!mScrolling) { + if(!mScrolling) + { return false; } @@ -63,7 +64,8 @@ public class ToggleScrollView extends ScrollView { return false; } - } catch (Exception e) + } + catch (Exception e) { // nothing }