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