mirror of
https://github.com/nuclearfog/Shitter.git
synced 2025-01-25 13:58:36 +01:00
bug fix, added comments
This commit is contained in:
parent
2777020637
commit
aa7534e6a3
@ -84,6 +84,7 @@ public class UserAdapter extends Adapter<ViewHolder> {
|
||||
notifyItemRangeInserted(end, data.getSize());
|
||||
}
|
||||
nextCursor = data.getNext();
|
||||
loadingIndex = NO_INDEX;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -217,7 +217,9 @@ public class ListFragment extends Fragment implements OnRefreshListener, ListCli
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* load content into the list
|
||||
*/
|
||||
private void load() {
|
||||
Bundle param = getArguments();
|
||||
if (param != null) {
|
||||
|
@ -217,9 +217,13 @@ public class MessageFragment extends Fragment implements OnRefreshListener, OnIt
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void load(MessageListLoader.Action m) {
|
||||
messageTask = new MessageListLoader(this, m);
|
||||
/**
|
||||
* load content into the list
|
||||
*
|
||||
* @param action mode for loading or removing messages
|
||||
*/
|
||||
private void load(MessageListLoader.Action action) {
|
||||
messageTask = new MessageListLoader(this, action);
|
||||
messageTask.execute();
|
||||
}
|
||||
}
|
@ -148,6 +148,7 @@ public class TrendFragment extends Fragment implements OnRefreshListener, TrendC
|
||||
|
||||
/**
|
||||
* called from {@link TrendListLoader} to enable or disable RefreshLayout
|
||||
*
|
||||
* @param enable true to enable RefreshLayout with delay
|
||||
*/
|
||||
public void setRefresh(boolean enable) {
|
||||
@ -164,7 +165,9 @@ public class TrendFragment extends Fragment implements OnRefreshListener, TrendC
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* load content into the list
|
||||
*/
|
||||
private void load() {
|
||||
trendTask = new TrendListLoader(this);
|
||||
trendTask.execute(settings.getTrendLocation().getWoeId());
|
||||
|
@ -33,7 +33,9 @@ import static android.os.AsyncTask.Status.RUNNING;
|
||||
import static org.nuclearfog.twidda.activity.TweetActivity.KEY_TWEET_ID;
|
||||
import static org.nuclearfog.twidda.activity.TweetActivity.KEY_TWEET_NAME;
|
||||
|
||||
|
||||
/**
|
||||
* #Fragment class for a list of tweets
|
||||
*/
|
||||
public class TweetFragment extends Fragment implements OnRefreshListener, TweetClickListener, FragmentChangeObserver {
|
||||
|
||||
public static final String KEY_FRAG_TWEET_MODE = "tweet_mode";
|
||||
@ -170,6 +172,7 @@ public class TweetFragment extends Fragment implements OnRefreshListener, TweetC
|
||||
|
||||
/**
|
||||
* called from {@link TweetListLoader} to enable or disable RefreshLayout
|
||||
*
|
||||
* @param enable true to enable RefreshLayout with delay
|
||||
*/
|
||||
public void setRefresh(boolean enable) {
|
||||
@ -198,8 +201,14 @@ public class TweetFragment extends Fragment implements OnRefreshListener, TweetC
|
||||
adapter.disableLoading();
|
||||
}
|
||||
|
||||
|
||||
private void load(long sinceId, long maxId, int pos) {
|
||||
/**
|
||||
* load content into the list
|
||||
*
|
||||
* @param sinceId ID where to start at
|
||||
* @param maxId ID where to stop
|
||||
* @param index index where tweet list should be added
|
||||
*/
|
||||
private void load(long sinceId, long maxId, int index) {
|
||||
Bundle param = getArguments();
|
||||
if (param != null) {
|
||||
int mode = param.getInt(KEY_FRAG_TWEET_MODE, 0);
|
||||
@ -239,7 +248,7 @@ public class TweetFragment extends Fragment implements OnRefreshListener, TweetC
|
||||
action = Action.LIST;
|
||||
break;
|
||||
}
|
||||
tweetTask = new TweetListLoader(this, action, id, search, pos);
|
||||
tweetTask = new TweetListLoader(this, action, id, search, index);
|
||||
tweetTask.execute(sinceId, maxId);
|
||||
}
|
||||
}
|
||||
|
@ -166,7 +166,11 @@ public class UserFragment extends Fragment implements OnRefreshListener, UserCli
|
||||
adapter.disableLoading();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* load content into the list
|
||||
*
|
||||
* @param cursor cursor of the list or {@link UserListLoader#NO_CURSOR} if there is none
|
||||
*/
|
||||
private void load(long cursor) {
|
||||
Bundle param = getArguments();
|
||||
if (param != null) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user