From abf55e2f8c92a3b2fa0729b6b64dd03a8befdec2 Mon Sep 17 00:00:00 2001 From: Chris Blyth Date: Fri, 20 Sep 2013 07:37:37 +0100 Subject: [PATCH 01/12] Fix for # 308 - Added null check into spotlight to prevent null pointer --- .../tweetlanes/android/core/view/TweetSpotlightFragment.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/android/libraries/TweetLanesCore/src/com/tweetlanes/android/core/view/TweetSpotlightFragment.java b/android/libraries/TweetLanesCore/src/com/tweetlanes/android/core/view/TweetSpotlightFragment.java index 4beaae66..f9be052c 100644 --- a/android/libraries/TweetLanesCore/src/com/tweetlanes/android/core/view/TweetSpotlightFragment.java +++ b/android/libraries/TweetLanesCore/src/com/tweetlanes/android/core/view/TweetSpotlightFragment.java @@ -153,7 +153,10 @@ public void finished(TwitterFetchResult result, }; mStatus = status; - TwitterManager.get().getStatus(mStatus.mOriginalRetweetId, mGetStatusCallback); + if(mStatus != null) + { + TwitterManager.get().getStatus(mStatus.mOriginalRetweetId, mGetStatusCallback); + } } else { onStatusRefresh(status); } From daf37fe9f949c9906bd4deba447812e47478325a Mon Sep 17 00:00:00 2001 From: Chris Blyth Date: Fri, 20 Sep 2013 07:38:58 +0100 Subject: [PATCH 02/12] Fix for #309 - added a null check into inflated layout fragment --- .../tweetlanes/android/core/view/InflatedLayoutFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/libraries/TweetLanesCore/src/com/tweetlanes/android/core/view/InflatedLayoutFragment.java b/android/libraries/TweetLanesCore/src/com/tweetlanes/android/core/view/InflatedLayoutFragment.java index 84458363..7fc17558 100644 --- a/android/libraries/TweetLanesCore/src/com/tweetlanes/android/core/view/InflatedLayoutFragment.java +++ b/android/libraries/TweetLanesCore/src/com/tweetlanes/android/core/view/InflatedLayoutFragment.java @@ -88,7 +88,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, @Override public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); - if (outState != null) { + if (outState != null && mLayoutResourceId != null) { outState.putInt(KEY_RESOURCE_ID, mLayoutResourceId); } } From 526db35dd7d437ca4de2e0466d6bc3f6269f0696 Mon Sep 17 00:00:00 2001 From: Chris Blyth Date: Fri, 20 Sep 2013 07:40:59 +0100 Subject: [PATCH 03/12] Fix for #310 - added check in twitter status when building an ADN status to ensure user is not null before trying to use it. --- .../src/org/tweetalib/android/model/TwitterStatus.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/android/libraries/SocialNetLib/src/org/tweetalib/android/model/TwitterStatus.java b/android/libraries/SocialNetLib/src/org/tweetalib/android/model/TwitterStatus.java index 7c5c5bf7..0a129406 100644 --- a/android/libraries/SocialNetLib/src/org/tweetalib/android/model/TwitterStatus.java +++ b/android/libraries/SocialNetLib/src/org/tweetalib/android/model/TwitterStatus.java @@ -175,9 +175,12 @@ public TwitterStatus(AdnPost post) { mInReplyToStatusId = post.mInReplyTo; mSource = post.mSource; - mUserId = post.mUser.mId; - mUserName = post.mUser.mName; - mUserScreenName = post.mUser.mUserName; + if(post.mUser != null) + { + mUserId = post.mUser.mId; + mUserName = post.mUser.mName; + mUserScreenName = post.mUser.mUserName; + } mIsFavorited = post.mIsFavorited; mIsRetweetedByMe = post.mIsRetweetedByMe; From da27c76a52fdf0495ccebf70f824d2b81ba3c9bb Mon Sep 17 00:00:00 2001 From: Chris Blyth Date: Fri, 20 Sep 2013 07:51:04 +0100 Subject: [PATCH 04/12] Fix for #311 move logic around to prevent out of bounds exception --- .../src/org/tweetalib/android/TwitterFetchUsers.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/android/libraries/SocialNetLib/src/org/tweetalib/android/TwitterFetchUsers.java b/android/libraries/SocialNetLib/src/org/tweetalib/android/TwitterFetchUsers.java index 3debdbdb..7370da29 100644 --- a/android/libraries/SocialNetLib/src/org/tweetalib/android/TwitterFetchUsers.java +++ b/android/libraries/SocialNetLib/src/org/tweetalib/android/TwitterFetchUsers.java @@ -49,7 +49,7 @@ public void clearCallbacks() { } /* - * + * */ public interface FetchUsersWorkerCallbacks { @@ -734,12 +734,13 @@ protected FetchUsersTaskOutput doInBackground( while (check) { //Establish ids for this batch for (int i = start; i < finish; i++) { - fetchIds.add(ids[i]); if (ids.length - 1 == i) { check = false; break; } + + fetchIds.add(ids[i]); } //Mark where to start and end next time round From 22718eabd1ad7c9a613114d8aeb93a614412f015 Mon Sep 17 00:00:00 2001 From: Chris Blyth Date: Mon, 23 Sep 2013 07:07:41 +0100 Subject: [PATCH 05/12] Fix for #315 added a check to ensure that home lane adapter is not null before calling data set changed on it. --- .../src/com/tweetlanes/android/core/view/HomeActivity.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/android/libraries/TweetLanesCore/src/com/tweetlanes/android/core/view/HomeActivity.java b/android/libraries/TweetLanesCore/src/com/tweetlanes/android/core/view/HomeActivity.java index 9353beb3..6f7c29b0 100644 --- a/android/libraries/TweetLanesCore/src/com/tweetlanes/android/core/view/HomeActivity.java +++ b/android/libraries/TweetLanesCore/src/com/tweetlanes/android/core/view/HomeActivity.java @@ -553,7 +553,10 @@ private void showAccount(AccountDescriptor selectedAccount, Constant.LaneType la clearFragmentsCache(); app.setCurrentAccount(selectedAccount.getId()); - mHomeLaneAdapter.notifyDataSetChanged(); + if(mHomeLaneAdapter != null) + { + mHomeLaneAdapter.notifyDataSetChanged(); + } // From http://stackoverflow.com/a/3419987/328679 Intent intent = getIntent(); From 0095288f93ce3e0374f05d244b9278ecf29b437b Mon Sep 17 00:00:00 2001 From: Chris Blyth Date: Mon, 23 Sep 2013 07:16:24 +0100 Subject: [PATCH 06/12] Fix for #316 added checking around feed fragment callbacks to ensure they are not detached before getting resource. --- .../android/core/view/TweetFeedFragment.java | 58 ++++++++++++------- 1 file changed, 38 insertions(+), 20 deletions(-) diff --git a/android/libraries/TweetLanesCore/src/com/tweetlanes/android/core/view/TweetFeedFragment.java b/android/libraries/TweetLanesCore/src/com/tweetlanes/android/core/view/TweetFeedFragment.java index d3699df0..807a956d 100644 --- a/android/libraries/TweetLanesCore/src/com/tweetlanes/android/core/view/TweetFeedFragment.java +++ b/android/libraries/TweetLanesCore/src/com/tweetlanes/android/core/view/TweetFeedFragment.java @@ -1335,10 +1335,16 @@ public void finished(TwitterFetchResult result, TwitterStatus status) { TwitterStatus cachedStatus = cachedStatuses.findByStatusId(status.mOriginalRetweetId); if (cachedStatus != null) { cachedStatus.setRetweet(true); - showToast(getString(R.string.retweeted_successfully)); + if(!mDetached) + { + showToast(getString(R.string.retweeted_successfully)); + } setIsRetweet(true); } else { - showToast(getString(R.string.retweeted_marking_un_successful)); + if(!mDetached) + { + showToast(getString(R.string.retweeted_marking_un_successful)); + } } } else { if (result.getErrorMessage() == null) { @@ -1351,7 +1357,7 @@ public void finished(TwitterFetchResult result, TwitterStatus status) { showUnsuccessful = true; } - if (showUnsuccessful) { + if (showUnsuccessful && !mDetached) { showToast(getString(R.string.retweeted_un_successful)); } } @@ -1390,14 +1396,20 @@ public void finished(boolean successful, TwitterStatuses statuses, Integer value } } - showToast(getString(settingFavorited ? R.string.favorited_successfully : R.string - .unfavorited_successfully)); + if(!mDetached) + { + showToast(getString(settingFavorited ? R.string.favorited_successfully : R.string + .unfavorited_successfully)); + } setIsFavorited(settingFavorited); } else { boolean newState = getSelectedFavoriteState() != ItemSelectedState.ALL; - showToast(getString(newState ? R.string.favorited_un_successfully : R.string + if(!mDetached) + { + showToast(getString(newState ? R.string.favorited_un_successfully : R.string .unfavorited_un_successfully)); + } } } @@ -1429,7 +1441,10 @@ public void finished(boolean successful, TwitterStatuses statuses, Integer value _mCachedStatusFeed.remove(selectedStatuses); } } else { - showToast(getString(R.string.deleted_un_successfully)); + if(!mDetached) + { + showToast(getString(R.string.deleted_un_successfully)); + } } } }; @@ -1470,23 +1485,26 @@ public void finished(TwitterFetchResult result, TwitterUsers users) { if (result.isSuccessful() && users != null && users.getUserCount() > 0) { int userCount = users.getUserCount(); String notice; - if (itemId == R.id.action_report_for_spam) { - if (userCount == 1) { - notice = "Reported @" + users.getUser(0).getScreenName() + - " for Spam."; + if(!mDetached) + { + if (itemId == R.id.action_report_for_spam) { + if (userCount == 1) { + notice = "Reported @" + users.getUser(0).getScreenName() + + " for Spam."; + } else { + notice = "Reported " + userCount + " users for Spam."; + } } else { - notice = "Reported " + userCount + " users for Spam."; + if (userCount == 1) { + notice = "Blocked @" + users.getUser(0).getScreenName() + "."; + } else { + notice = "Blocked " + userCount + " users."; + } } - } else { - if (userCount == 1) { - notice = "Blocked @" + users.getUser(0).getScreenName() + "."; - } else { - notice = "Blocked " + userCount + " users."; + if (notice != null) { + showToast(notice); } } - if (notice != null) { - showToast(notice); - } } } }; From d6730a9dc1a9d40c03985cf7c094be2a213c9ae6 Mon Sep 17 00:00:00 2001 From: Chris Blyth Date: Mon, 23 Sep 2013 07:25:17 +0100 Subject: [PATCH 07/12] Fix for #306 also includes a little refactor so the logic to set and reset screen orientation is in a seperate function. Incase we want to do this again somewhere else. --- .../android/core/view/TweetFeedFragment.java | 31 +++++++++++++++---- 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/android/libraries/TweetLanesCore/src/com/tweetlanes/android/core/view/TweetFeedFragment.java b/android/libraries/TweetLanesCore/src/com/tweetlanes/android/core/view/TweetFeedFragment.java index 807a956d..4c7c2fb6 100644 --- a/android/libraries/TweetLanesCore/src/com/tweetlanes/android/core/view/TweetFeedFragment.java +++ b/android/libraries/TweetLanesCore/src/com/tweetlanes/android/core/view/TweetFeedFragment.java @@ -17,6 +17,7 @@ import android.content.Intent; import android.content.IntentFilter; import android.content.pm.ActivityInfo; +import android.content.res.Configuration; import android.os.Bundle; import android.os.Handler; import android.support.v4.content.LocalBroadcastManager; @@ -243,6 +244,28 @@ public void fetchNewestTweets() { } } + private void lockScreenRotation() + { + if (getActivity() != null) { + switch (getActivity().getResources().getConfiguration().orientation) + { + case Configuration.ORIENTATION_PORTRAIT: + getActivity().setRequestedOrientation( ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); + break; + case Configuration.ORIENTATION_LANDSCAPE: + getActivity().setRequestedOrientation( ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); + break; + } + } + } + + private void resetScreenRotation() + { + if (getActivity() != null) { + getActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED); + } + } + /* * */ @@ -253,9 +276,7 @@ void fetchNewestTweets(final long sinceStatusId, Long maxStatusId) { if (mTweetDataRefreshCallback == null) { if (maxStatusId == null) { - if (getActivity() != null) { - getActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_NOSENSOR); - } + lockScreenRotation(); mTimesFetchCalled = 0; TwitterStatus visibleStatus = getVisibleStatus(); if (visibleStatus != null && mLastTwitterStatusIdSeen < visibleStatus.mId) { @@ -943,9 +964,7 @@ private void onRefreshFinished(TwitterStatuses feed) { } mTweetDataRefreshCallback = null; - if (getActivity() != null) { - getActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED); - } + resetScreenRotation(); } /* From 437e1fe3f5ae1e95b4c2124a46855bb03e45f810 Mon Sep 17 00:00:00 2001 From: Chris Blyth Date: Mon, 23 Sep 2013 07:49:28 +0100 Subject: [PATCH 08/12] Fix for #307 if there are no status after a refresh, then set the position to be the very top of the list. Also added logic so if the only new status was yours, it jumps to top. --- .../android/core/view/TweetFeedFragment.java | 54 ++++++++++--------- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/android/libraries/TweetLanesCore/src/com/tweetlanes/android/core/view/TweetFeedFragment.java b/android/libraries/TweetLanesCore/src/com/tweetlanes/android/core/view/TweetFeedFragment.java index 4c7c2fb6..7502c670 100644 --- a/android/libraries/TweetLanesCore/src/com/tweetlanes/android/core/view/TweetFeedFragment.java +++ b/android/libraries/TweetLanesCore/src/com/tweetlanes/android/core/view/TweetFeedFragment.java @@ -244,23 +244,20 @@ public void fetchNewestTweets() { } } - private void lockScreenRotation() - { + private void lockScreenRotation() { if (getActivity() != null) { - switch (getActivity().getResources().getConfiguration().orientation) - { + switch (getActivity().getResources().getConfiguration().orientation) { case Configuration.ORIENTATION_PORTRAIT: - getActivity().setRequestedOrientation( ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); + getActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); break; case Configuration.ORIENTATION_LANDSCAPE: - getActivity().setRequestedOrientation( ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); + getActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); break; } } } - private void resetScreenRotation() - { + private void resetScreenRotation() { if (getActivity() != null) { getActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED); } @@ -513,7 +510,7 @@ boolean configureCachedStatuses() { setStatusFeed(_mCachedStatusFeed, false); if (getStatusFeed() != null && mLastTwitterStatusIdSeen != null) { Integer index = getStatusFeed().getStatusIndex(mLastTwitterStatusIdSeen); - if(index != null){ + if (index != null) { updateListHeading(index); } } @@ -804,7 +801,7 @@ public void onClick(View v) { }; /* - * + * */ void setListHeadingVisiblilty(int value) { mListHeadingTextView.setVisibility(value); @@ -949,20 +946,31 @@ private void onRefreshFinished(TwitterStatuses feed) { } if (statusIndex != null) { - mTweetFeedListView.getRefreshableView() - .setSelectionFromTop(statusIndex.intValue() + 1, mScrollTracker.getFirstVisibleYOffset()); + int newIndex = statusIndex.intValue() + 1; + + if (mNewStatuses == 1 && getStatusFeed() != null) { + TwitterStatus firstStatus = getStatusFeed().getStatus(0); + if (firstStatus != null && firstStatus.getAuthorScreenName().equals(getApp().getCurrentAccount().getScreenName())) { + newIndex = statusIndex.intValue(); + } + } + + mTweetFeedListView.getRefreshableView().setSelectionFromTop(newIndex, mScrollTracker.getFirstVisibleYOffset()); if (visibleStatus != null && mLastTwitterStatusIdSeen < visibleStatus.mId) { mLastTwitterStatusIdSeen = visibleStatus.mId; } if (!mDetached) { - updateListHeading(statusIndex.intValue() + 1); + updateListHeading(newIndex); } } else { showToast(getString(R.string.lost_position)); } + if (mNewStatuses == 0) { + mTweetFeedListView.getRefreshableView().setSelectionFromTop(0, mScrollTracker.getFirstVisibleYOffset()); + } mTweetDataRefreshCallback = null; resetScreenRotation(); } @@ -1354,14 +1362,12 @@ public void finished(TwitterFetchResult result, TwitterStatus status) { TwitterStatus cachedStatus = cachedStatuses.findByStatusId(status.mOriginalRetweetId); if (cachedStatus != null) { cachedStatus.setRetweet(true); - if(!mDetached) - { + if (!mDetached) { showToast(getString(R.string.retweeted_successfully)); } setIsRetweet(true); } else { - if(!mDetached) - { + if (!mDetached) { showToast(getString(R.string.retweeted_marking_un_successful)); } } @@ -1415,8 +1421,7 @@ public void finished(boolean successful, TwitterStatuses statuses, Integer value } } - if(!mDetached) - { + if (!mDetached) { showToast(getString(settingFavorited ? R.string.favorited_successfully : R.string .unfavorited_successfully)); } @@ -1424,10 +1429,9 @@ public void finished(boolean successful, TwitterStatuses statuses, Integer value setIsFavorited(settingFavorited); } else { boolean newState = getSelectedFavoriteState() != ItemSelectedState.ALL; - if(!mDetached) - { + if (!mDetached) { showToast(getString(newState ? R.string.favorited_un_successfully : R.string - .unfavorited_un_successfully)); + .unfavorited_un_successfully)); } } } @@ -1460,8 +1464,7 @@ public void finished(boolean successful, TwitterStatuses statuses, Integer value _mCachedStatusFeed.remove(selectedStatuses); } } else { - if(!mDetached) - { + if (!mDetached) { showToast(getString(R.string.deleted_un_successfully)); } } @@ -1504,8 +1507,7 @@ public void finished(TwitterFetchResult result, TwitterUsers users) { if (result.isSuccessful() && users != null && users.getUserCount() > 0) { int userCount = users.getUserCount(); String notice; - if(!mDetached) - { + if (!mDetached) { if (itemId == R.id.action_report_for_spam) { if (userCount == 1) { notice = "Reported @" + users.getUser(0).getScreenName() + From 8cfde29a70db56531aa2f9813031e40da77ab154 Mon Sep 17 00:00:00 2001 From: Chris Blyth Date: Mon, 23 Sep 2013 07:49:51 +0100 Subject: [PATCH 09/12] Possible fix for #305. Only allow one of the compose to be set to visible --- .../src/com/tweetlanes/android/core/view/BaseLaneActivity.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/android/libraries/TweetLanesCore/src/com/tweetlanes/android/core/view/BaseLaneActivity.java b/android/libraries/TweetLanesCore/src/com/tweetlanes/android/core/view/BaseLaneActivity.java index a25bb26a..5ad88491 100644 --- a/android/libraries/TweetLanesCore/src/com/tweetlanes/android/core/view/BaseLaneActivity.java +++ b/android/libraries/TweetLanesCore/src/com/tweetlanes/android/core/view/BaseLaneActivity.java @@ -1242,7 +1242,9 @@ public void onFocusChange(View v, boolean hasFocus) { if (mComposeTweetView != null) { mComposeTweetView.setVisibility(hasFocus ? View.GONE : View.VISIBLE); + hasFocus = false; } + if (mComposeDirectMessageView != null) { mComposeDirectMessageView .setVisibility(hasFocus ? View.GONE : View.VISIBLE); From 0f3f4b37d712595266d840735b53e9cd8a399997 Mon Sep 17 00:00:00 2001 From: Chris Blyth Date: Mon, 23 Sep 2013 07:52:33 +0100 Subject: [PATCH 10/12] Update version name for beta 7 --- android/clientbeta/AndroidManifest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/clientbeta/AndroidManifest.xml b/android/clientbeta/AndroidManifest.xml index 2918dce1..8df79438 100644 --- a/android/clientbeta/AndroidManifest.xml +++ b/android/clientbeta/AndroidManifest.xml @@ -2,7 +2,7 @@ + android:versionName="1.2.1_b7"> From adc859ab165a13e485e0eb74c657928a2acfdb80 Mon Sep 17 00:00:00 2001 From: Chris Blyth Date: Tue, 24 Sep 2013 06:50:13 +0100 Subject: [PATCH 11/12] Revert "Possible fix for #305. Only allow one of the compose to be set to visible" This reverts commit 8cfde29a70db56531aa2f9813031e40da77ab154. --- .../src/com/tweetlanes/android/core/view/BaseLaneActivity.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/android/libraries/TweetLanesCore/src/com/tweetlanes/android/core/view/BaseLaneActivity.java b/android/libraries/TweetLanesCore/src/com/tweetlanes/android/core/view/BaseLaneActivity.java index 5ad88491..a25bb26a 100644 --- a/android/libraries/TweetLanesCore/src/com/tweetlanes/android/core/view/BaseLaneActivity.java +++ b/android/libraries/TweetLanesCore/src/com/tweetlanes/android/core/view/BaseLaneActivity.java @@ -1242,9 +1242,7 @@ public void onFocusChange(View v, boolean hasFocus) { if (mComposeTweetView != null) { mComposeTweetView.setVisibility(hasFocus ? View.GONE : View.VISIBLE); - hasFocus = false; } - if (mComposeDirectMessageView != null) { mComposeDirectMessageView .setVisibility(hasFocus ? View.GONE : View.VISIBLE); From 4139e3cc0f62e88e25b9e3079e0ea4aca9085535 Mon Sep 17 00:00:00 2001 From: Chris Blyth Date: Tue, 24 Sep 2013 07:14:44 +0100 Subject: [PATCH 12/12] Proper fix for #305. Change to the logic around showing/hiding compose when search is pressed. --- .../android/core/view/BaseLaneActivity.java | 23 +++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/android/libraries/TweetLanesCore/src/com/tweetlanes/android/core/view/BaseLaneActivity.java b/android/libraries/TweetLanesCore/src/com/tweetlanes/android/core/view/BaseLaneActivity.java index a25bb26a..13c89db2 100644 --- a/android/libraries/TweetLanesCore/src/com/tweetlanes/android/core/view/BaseLaneActivity.java +++ b/android/libraries/TweetLanesCore/src/com/tweetlanes/android/core/view/BaseLaneActivity.java @@ -1239,14 +1239,29 @@ void configureActionBarSearchView(Menu menu) { public void onFocusChange(View v, boolean hasFocus) { mCurrentComposeFragment.setIgnoreFocusChange(true); + if (mComposeTweetView != null) { - mComposeTweetView.setVisibility(hasFocus ? View.GONE - : View.VISIBLE); + mComposeTweetView.setVisibility(View.GONE); } if (mComposeDirectMessageView != null) { - mComposeDirectMessageView - .setVisibility(hasFocus ? View.GONE : View.VISIBLE); + mComposeDirectMessageView.setVisibility(View.GONE); } + + if(!hasFocus) + { + if (mCurrentComposeFragment == mComposeDirectMessageFragment) { + if (mComposeDirectMessageView != null) { + mComposeDirectMessageView.setVisibility(View.VISIBLE); + } + } + else + { + if (mComposeTweetView != null) { + mComposeTweetView.setVisibility(View.VISIBLE); + } + } + } + mCurrentComposeFragment.setIgnoreFocusChange(false); }