This commit is contained in:
NudeDude 2018-02-02 19:42:38 +01:00
parent 044535fad4
commit 7a6e99e87c
3 changed files with 4 additions and 5 deletions

View File

@ -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

View File

@ -399,6 +399,7 @@ public class TwitterEngine {
public static TwitterEngine getInstance(Context context) {
if(mTwitter == null) {
mTwitter = new TwitterEngine(context);
mTwitter.init();
}
return mTwitter;
}

View File

@ -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);
}
/**