cleanup
This commit is contained in:
parent
044535fad4
commit
7a6e99e87c
|
@ -19,7 +19,6 @@ public class MainPage extends AsyncTask<Integer, Void, Boolean> {
|
|||
|
||||
private TwitterEngine mTwitter;
|
||||
private Context context;
|
||||
|
||||
private SwipeRefreshLayout timelineRefresh, trendRefresh, mentionRefresh;
|
||||
private ListView timelineList, trendList, mentionList;
|
||||
private TimelineAdapter timelineAdapter, mentionAdapter;
|
||||
|
@ -32,7 +31,6 @@ public class MainPage extends AsyncTask<Integer, Void, Boolean> {
|
|||
public MainPage(Context context) {
|
||||
this.context = context;
|
||||
mTwitter = TwitterEngine.getInstance(context);
|
||||
mTwitter.init();// preload
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -399,6 +399,7 @@ public class TwitterEngine {
|
|||
public static TwitterEngine getInstance(Context context) {
|
||||
if(mTwitter == null) {
|
||||
mTwitter = new TwitterEngine(context);
|
||||
mTwitter.init();
|
||||
}
|
||||
return mTwitter;
|
||||
}
|
||||
|
|
|
@ -170,10 +170,10 @@ public class UserProfile extends AppCompatActivity implements View.OnClickListen
|
|||
ProfileAction tweets = new ProfileAction(this, tool);
|
||||
switch(currentTab) {
|
||||
case "tweets":
|
||||
tweets.execute(userId, ProfileAction.GET_TWEETS);
|
||||
tweets.execute(userId, ProfileAction.GET_TWEETS,1L);
|
||||
break;
|
||||
case "favorites":
|
||||
tweets.execute(userId, ProfileAction.GET_FAVS);
|
||||
tweets.execute(userId, ProfileAction.GET_FAVS,1L);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -207,7 +207,7 @@ public class UserProfile extends AppCompatActivity implements View.OnClickListen
|
|||
* Profile Information
|
||||
*/
|
||||
private void initElements() {
|
||||
new ProfileAction(this, tool).execute(userId, ProfileAction.GET_INFORMATION);
|
||||
new ProfileAction(this, tool).execute(userId, ProfileAction.GET_INFORMATION,1L);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue