mirror of
https://github.com/nuclearfog/Shitter.git
synced 2025-02-09 16:48:38 +01:00
tweet adapter bug fix
This commit is contained in:
parent
578b9c471a
commit
13bd2f8c0d
@ -78,6 +78,12 @@ public class TweetAdapter extends Adapter<TweetAdapter.ItemHolder> {
|
||||
}
|
||||
|
||||
|
||||
public void clear() {
|
||||
tweets = new Tweet[0];
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
|
||||
public boolean isEmpty() {
|
||||
return tweets.length == 0;
|
||||
}
|
||||
|
@ -118,8 +118,10 @@ public class TweetListFragment extends Fragment implements OnRefreshListener, On
|
||||
|
||||
@Override
|
||||
public void onActivityResult(int reqCode, int returnCode, Intent i) {
|
||||
if (reqCode == REQUEST_TWEET_CHANGED && returnCode == RETURN_TWEET_CHANGED)
|
||||
if (reqCode == REQUEST_TWEET_CHANGED && returnCode == RETURN_TWEET_CHANGED) {
|
||||
adapter.clear();
|
||||
tweetTask = null;
|
||||
}
|
||||
super.onActivityResult(reqCode, returnCode, i);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user