Skip to content
Browse files

Wait for onResume() to mess with threads when changing tabs.

  • Loading branch information...
1 parent 56b71ab commit 64c65a5022ba573c5740b2bec3c880df074af380 @thomaslee committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/co/tomlee/frapp/PostsActivity.java
View
4 src/co/tomlee/frapp/PostsActivity.java
@@ -102,10 +102,10 @@ public void onCreate(Bundle savedInstanceState) {
tabHost.setOnTabChangedListener(new TabHost.OnTabChangeListener() {
@Override
public void onTabChanged(String tabId) {
- stopPollThread();
+ if (ready) stopPollThread();
stream = new Stream(tabId);
postsAdapter = streamAdapters.get(stream);
- startPollThread();
+ if (ready) startPollThread();
}
});
postsAdapter = myStreamPostsAdapter;

0 comments on commit 64c65a5

Please sign in to comment.
Something went wrong with that request. Please try again.