diff --git a/.travis.yml b/.travis.yml index ec7adb7d2..928901f93 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,10 +7,10 @@ android: - tools # The BuildTools version used by your project - - build-tools-23.0.3 + - build-tools-24.0.0 # The SDK version used to compile your project - - android-23 + - android-24 # Additional components - extra-google-google_play_services diff --git a/build.gradle b/build.gradle index ff6010a56..3a10d4827 100644 --- a/build.gradle +++ b/build.gradle @@ -36,8 +36,8 @@ subprojects { if (project.hasProperty('android')) { android { - compileSdkVersion 23 - buildToolsVersion '23.0.3' + compileSdkVersion 24 + buildToolsVersion '24.0.0' lintOptions { abortOnError false diff --git a/twidere.component.common/src/main/java/org/mariotaku/microblog/library/twitter/api/FavoritesResources.java b/twidere.component.common/src/main/java/org/mariotaku/microblog/library/twitter/api/FavoritesResources.java index fcc334855..090e32fa9 100644 --- a/twidere.component.common/src/main/java/org/mariotaku/microblog/library/twitter/api/FavoritesResources.java +++ b/twidere.component.common/src/main/java/org/mariotaku/microblog/library/twitter/api/FavoritesResources.java @@ -19,17 +19,16 @@ package org.mariotaku.microblog.library.twitter.api; -import org.mariotaku.microblog.library.twitter.template.StatusAnnotationTemplate; -import org.mariotaku.restfu.annotation.method.GET; -import org.mariotaku.restfu.annotation.method.POST; -import org.mariotaku.restfu.annotation.param.KeyValue; -import org.mariotaku.restfu.annotation.param.Param; -import org.mariotaku.restfu.annotation.param.Queries; -import org.mariotaku.restfu.annotation.param.Query; import org.mariotaku.microblog.library.MicroBlogException; import org.mariotaku.microblog.library.twitter.model.Paging; import org.mariotaku.microblog.library.twitter.model.ResponseList; import org.mariotaku.microblog.library.twitter.model.Status; +import org.mariotaku.microblog.library.twitter.template.StatusAnnotationTemplate; +import org.mariotaku.restfu.annotation.method.GET; +import org.mariotaku.restfu.annotation.method.POST; +import org.mariotaku.restfu.annotation.param.Param; +import org.mariotaku.restfu.annotation.param.Queries; +import org.mariotaku.restfu.annotation.param.Query; @SuppressWarnings("RedundantThrows") @Queries(template = StatusAnnotationTemplate.class) @@ -45,8 +44,8 @@ public interface FavoritesResources { ResponseList getFavorites() throws MicroBlogException; @GET("/favorites/list.json") - ResponseList getFavorites(@Query("user_id") String userId, @Query({"since_id", "max_id", "count"}) Paging paging) throws MicroBlogException; + ResponseList getFavorites(@Query("user_id") String userId, @Query Paging paging) throws MicroBlogException; @GET("/favorites/list.json") - ResponseList getFavoritesByScreenName(@Query("screen_name") String screenName, @Query({"since_id", "max_id", "count"}) Paging paging) throws MicroBlogException; + ResponseList getFavoritesByScreenName(@Query("screen_name") String screenName, @Query Paging paging) throws MicroBlogException; } diff --git a/twidere/build.gradle b/twidere/build.gradle index d2d1c6832..ddde53043 100644 --- a/twidere/build.gradle +++ b/twidere/build.gradle @@ -27,7 +27,7 @@ android { defaultConfig { applicationId "org.mariotaku.twidere" minSdkVersion 14 - targetSdkVersion 23 + targetSdkVersion 24 versionCode 196 versionName "3.1.7" multiDexEnabled true diff --git a/twidere/src/main/AndroidManifest.xml b/twidere/src/main/AndroidManifest.xml index e537f5815..4ef9ee671 100644 --- a/twidere/src/main/AndroidManifest.xml +++ b/twidere/src/main/AndroidManifest.xml @@ -72,6 +72,7 @@ android:hardwareAccelerated="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" + android:resizeableActivity="true" android:supportsRtl="true" android:theme="@style/Theme.Twidere.NoActionBar" tools:ignore="UnusedAttribute"> diff --git a/twidere/src/main/java/org/mariotaku/twidere/fragment/AbsStatusesFragment.java b/twidere/src/main/java/org/mariotaku/twidere/fragment/AbsStatusesFragment.java index 10a1289b9..4a16075b0 100644 --- a/twidere/src/main/java/org/mariotaku/twidere/fragment/AbsStatusesFragment.java +++ b/twidere/src/main/java/org/mariotaku/twidere/fragment/AbsStatusesFragment.java @@ -320,7 +320,7 @@ public abstract class AbsStatusesFragment extends AbsContentListRecyclerViewFrag if (loader instanceof IExtendedLoader) { ((IExtendedLoader) loader).setFromUser(false); } - onLoadingFinished(); + onStatusesLoaded(loader, data); } @Override @@ -574,7 +574,7 @@ public abstract class AbsStatusesFragment extends AbsContentListRecyclerViewFrag protected abstract Loader> onCreateStatusesLoader(final Context context, final Bundle args, final boolean fromUser); - protected abstract void onLoadingFinished(); + protected abstract void onStatusesLoaded(Loader> loader, List data); protected final void saveReadPosition(int position) { final String readPositionTag = getReadPositionTagWithAccounts(); diff --git a/twidere/src/main/java/org/mariotaku/twidere/fragment/CursorStatusesFragment.java b/twidere/src/main/java/org/mariotaku/twidere/fragment/CursorStatusesFragment.java index 50341db12..022717fa9 100644 --- a/twidere/src/main/java/org/mariotaku/twidere/fragment/CursorStatusesFragment.java +++ b/twidere/src/main/java/org/mariotaku/twidere/fragment/CursorStatusesFragment.java @@ -70,22 +70,8 @@ import static org.mariotaku.twidere.util.DataStoreUtils.getTableNameByUri; public abstract class CursorStatusesFragment extends AbsStatusesFragment { @Override - protected void onLoadingFinished() { - final UserKey[] accountKeys = getAccountKeys(); - final ParcelableStatusesAdapter adapter = getAdapter(); - if (adapter.getItemCount() > 0) { - showContent(); - } else if (accountKeys.length > 0) { - final ErrorInfoStore.DisplayErrorInfo errorInfo = ErrorInfoStore.getErrorInfo(getContext(), - mErrorInfoStore.get(getErrorInfoKey(), accountKeys[0])); - if (errorInfo != null) { - showEmpty(errorInfo.getIcon(), errorInfo.getMessage()); - } else { - showEmpty(R.drawable.ic_info_refresh, getString(R.string.swipe_down_to_refresh)); - } - } else { - showError(R.drawable.ic_info_accounts, getString(R.string.no_account_selected)); - } + protected void onStatusesLoaded(Loader> loader, List data) { + showContentOrError(); } private ContentObserver mContentObserver; @@ -126,6 +112,24 @@ public abstract class CursorStatusesFragment extends AbsStatusesFragment { return new CursorStatusesBusCallback(); } + private void showContentOrError() { + final UserKey[] accountKeys = getAccountKeys(); + final ParcelableStatusesAdapter adapter = getAdapter(); + if (adapter.getItemCount() > 0) { + showContent(); + } else if (accountKeys.length > 0) { + final ErrorInfoStore.DisplayErrorInfo errorInfo = ErrorInfoStore.getErrorInfo(getContext(), + mErrorInfoStore.get(getErrorInfoKey(), accountKeys[0])); + if (errorInfo != null) { + showEmpty(errorInfo.getIcon(), errorInfo.getMessage()); + } else { + showEmpty(R.drawable.ic_info_refresh, getString(R.string.swipe_down_to_refresh)); + } + } else { + showError(R.drawable.ic_info_accounts, getString(R.string.no_account_selected)); + } + } + protected class CursorStatusesBusCallback { @@ -136,7 +140,7 @@ public abstract class CursorStatusesFragment extends AbsStatusesFragment { if (!event.running) { setLoadMoreIndicatorPosition(IndicatorPosition.NONE); setRefreshEnabled(true); - onLoadingFinished(); + showContentOrError(); } } diff --git a/twidere/src/main/java/org/mariotaku/twidere/fragment/ParcelableStatusesFragment.java b/twidere/src/main/java/org/mariotaku/twidere/fragment/ParcelableStatusesFragment.java index 22aa66473..a3149edeb 100644 --- a/twidere/src/main/java/org/mariotaku/twidere/fragment/ParcelableStatusesFragment.java +++ b/twidere/src/main/java/org/mariotaku/twidere/fragment/ParcelableStatusesFragment.java @@ -24,15 +24,19 @@ import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v4.app.LoaderManager; +import android.support.v4.content.Loader; import android.support.v7.widget.LinearLayoutManager; import android.text.TextUtils; import com.squareup.otto.Subscribe; +import org.mariotaku.microblog.library.MicroBlogException; +import org.mariotaku.twidere.R; import org.mariotaku.twidere.adapter.ListParcelableStatusesAdapter; import org.mariotaku.twidere.adapter.ParcelableStatusesAdapter; import org.mariotaku.twidere.adapter.iface.ILoadMoreSupportAdapter.IndicatorPosition; import org.mariotaku.twidere.adapter.iface.IStatusesAdapter; +import org.mariotaku.twidere.loader.MicroBlogAPIStatusesLoader; import org.mariotaku.twidere.model.BaseRefreshTaskParam; import org.mariotaku.twidere.model.ParcelableStatus; import org.mariotaku.twidere.model.RefreshTaskParam; @@ -139,11 +143,23 @@ public abstract class ParcelableStatusesFragment extends AbsStatusesFragment { } @Override - protected void onLoadingFinished() { - showContent(); + protected void onStatusesLoaded(Loader> loader, List data) { setRefreshEnabled(true); setRefreshing(false); setLoadMoreIndicatorPosition(IndicatorPosition.NONE); + final ParcelableStatusesAdapter adapter = getAdapter(); + if (adapter.getItemCount() > 0) { + showContent(); + } else if (loader instanceof MicroBlogAPIStatusesLoader) { + MicroBlogException e = ((MicroBlogAPIStatusesLoader) loader).getException(); + if (e != null) { + showError(R.drawable.ic_info_error_generic, Utils.getErrorMessage(getContext(), e)); + } else { + showEmpty(R.drawable.ic_info_refresh, getString(R.string.swipe_down_to_refresh)); + } + } else { + showEmpty(R.drawable.ic_info_refresh, getString(R.string.swipe_down_to_refresh)); + } } diff --git a/twidere/src/main/java/org/mariotaku/twidere/fragment/UserFavoritesFragment.java b/twidere/src/main/java/org/mariotaku/twidere/fragment/UserFavoritesFragment.java index e1a97abbf..2608d2723 100644 --- a/twidere/src/main/java/org/mariotaku/twidere/fragment/UserFavoritesFragment.java +++ b/twidere/src/main/java/org/mariotaku/twidere/fragment/UserFavoritesFragment.java @@ -47,12 +47,14 @@ public class UserFavoritesFragment extends ParcelableStatusesFragment { final UserKey accountKey = Utils.getAccountKey(context, args); final String maxId = args.getString(EXTRA_MAX_ID); final String sinceId = args.getString(EXTRA_SINCE_ID); + final int page = args.getInt(EXTRA_PAGE, -1); final UserKey userKey = args.getParcelable(EXTRA_USER_KEY); final String screenName = args.getString(EXTRA_SCREEN_NAME); final int tabPosition = args.getInt(EXTRA_TAB_POSITION, -1); final boolean loadingMore = args.getBoolean(EXTRA_LOADING_MORE, false); return new UserFavoritesLoader(context, accountKey, userKey, screenName, sinceId, maxId, - getAdapterData(), getSavedStatusesFileArgs(), tabPosition, fromUser, loadingMore); + page,getAdapterData(), getSavedStatusesFileArgs(), tabPosition, fromUser, + loadingMore); } @Override diff --git a/twidere/src/main/java/org/mariotaku/twidere/loader/ConversationLoader.java b/twidere/src/main/java/org/mariotaku/twidere/loader/ConversationLoader.java index 604481f9e..e4492cc31 100644 --- a/twidere/src/main/java/org/mariotaku/twidere/loader/ConversationLoader.java +++ b/twidere/src/main/java/org/mariotaku/twidere/loader/ConversationLoader.java @@ -56,7 +56,7 @@ public class ConversationLoader extends MicroBlogAPIStatusesLoader { final long sinceSortId, final long maxSortId, final List data, final boolean fromUser, final boolean loadingMore) { - super(context, status.account_key, sinceId, maxId, data, null, -1, fromUser, loadingMore); + super(context, status.account_key, sinceId, maxId, -1, data, null, -1, fromUser, loadingMore); mStatus = Nullables.assertNonNull(ParcelUtils.clone(status)); mSinceSortId = sinceSortId; mMaxSortId = maxSortId; diff --git a/twidere/src/main/java/org/mariotaku/twidere/loader/GroupTimelineLoader.java b/twidere/src/main/java/org/mariotaku/twidere/loader/GroupTimelineLoader.java index de7059be7..d5011242b 100644 --- a/twidere/src/main/java/org/mariotaku/twidere/loader/GroupTimelineLoader.java +++ b/twidere/src/main/java/org/mariotaku/twidere/loader/GroupTimelineLoader.java @@ -45,7 +45,7 @@ public class GroupTimelineLoader extends MicroBlogAPIStatusesLoader { final String groupName, final String sinceId, final String maxId, final List data, final String[] savedStatusesArgs, final int tabPosition, boolean fromUser, boolean loadingMore) { - super(context, accountKey, sinceId, maxId, data, savedStatusesArgs, tabPosition, fromUser, loadingMore); + super(context, accountKey, sinceId, maxId, -1, data, savedStatusesArgs, tabPosition, fromUser, loadingMore); mGroupId = groupId; mGroupName = groupName; } diff --git a/twidere/src/main/java/org/mariotaku/twidere/loader/MediaTimelineLoader.java b/twidere/src/main/java/org/mariotaku/twidere/loader/MediaTimelineLoader.java index b27fcbf9e..46bd41abc 100644 --- a/twidere/src/main/java/org/mariotaku/twidere/loader/MediaTimelineLoader.java +++ b/twidere/src/main/java/org/mariotaku/twidere/loader/MediaTimelineLoader.java @@ -61,7 +61,7 @@ public class MediaTimelineLoader extends MicroBlogAPIStatusesLoader { @Nullable final String screenName, final String sinceId, final String maxId, final List data, final String[] savedStatusesArgs, final int tabPosition, final boolean fromUser, boolean loadingMore) { - super(context, accountKey, sinceId, maxId, data, savedStatusesArgs, tabPosition, fromUser, + super(context, accountKey, sinceId, maxId, -1, data, savedStatusesArgs, tabPosition, fromUser, loadingMore); mUserKey = userKey; mUserScreenName = screenName; diff --git a/twidere/src/main/java/org/mariotaku/twidere/loader/MicroBlogAPIStatusesLoader.java b/twidere/src/main/java/org/mariotaku/twidere/loader/MicroBlogAPIStatusesLoader.java index 8c879463d..a1391bdc7 100644 --- a/twidere/src/main/java/org/mariotaku/twidere/loader/MicroBlogAPIStatusesLoader.java +++ b/twidere/src/main/java/org/mariotaku/twidere/loader/MicroBlogAPIStatusesLoader.java @@ -62,6 +62,7 @@ import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; +import java.util.concurrent.atomic.AtomicReference; import javax.inject.Inject; @@ -70,11 +71,13 @@ public abstract class MicroBlogAPIStatusesLoader extends ParcelableStatusesLoade @Nullable private final UserKey mAccountKey; private final String mMaxId, mSinceId; + private final int mPage; @Nullable private final Object[] mSavedStatusesFileArgs; private final boolean mLoadingMore; // Statuses sorted descending by default private Comparator mComparator = ParcelableStatus.REVERSE_COMPARATOR; + private AtomicReference mException = new AtomicReference<>(); @Inject protected DiskCache mFileCache; @@ -86,7 +89,7 @@ public abstract class MicroBlogAPIStatusesLoader extends ParcelableStatusesLoade public MicroBlogAPIStatusesLoader(@NonNull final Context context, @Nullable final UserKey accountKey, final String sinceId, final String maxId, - @Nullable final List data, + int page, @Nullable final List data, @Nullable final String[] savedStatusesArgs, final int tabPosition, final boolean fromUser, boolean loadingMore) { super(context, data, tabPosition, fromUser); @@ -94,6 +97,7 @@ public abstract class MicroBlogAPIStatusesLoader extends ParcelableStatusesLoade mAccountKey = accountKey; mMaxId = maxId; mSinceId = sinceId; + mPage = page; mSavedStatusesFileArgs = savedStatusesArgs; mLoadingMore = loadingMore; } @@ -142,6 +146,7 @@ public abstract class MicroBlogAPIStatusesLoader extends ParcelableStatusesLoade statuses = getStatuses(twitter, credentials, paging); } catch (final MicroBlogException e) { // mHandler.post(new ShowErrorRunnable(e)); + mException.set(e); if (BuildConfig.DEBUG) { Log.w(LOGTAG, e); } @@ -209,6 +214,10 @@ public abstract class MicroBlogAPIStatusesLoader extends ParcelableStatusesLoade return mMaxId; } + public int getPage() { + return mPage; + } + @Nullable public UserKey getAccountKey() { return mAccountKey; @@ -222,9 +231,18 @@ public abstract class MicroBlogAPIStatusesLoader extends ParcelableStatusesLoade @WorkerThread protected abstract boolean shouldFilterStatus(final SQLiteDatabase database, final ParcelableStatus status); + @Nullable + public MicroBlogException getException() { + return mException.get(); + } + + @Override + protected void onStartLoading() { + mException.set(null); + super.onStartLoading(); + } + protected void processPaging(@NonNull ParcelableCredentials credentials, int loadItemLimit, @NonNull final Paging paging) { - - paging.setCount(loadItemLimit); if (mMaxId != null) { paging.setMaxId(mMaxId); diff --git a/twidere/src/main/java/org/mariotaku/twidere/loader/PublicTimelineLoader.java b/twidere/src/main/java/org/mariotaku/twidere/loader/PublicTimelineLoader.java index fa1b42ffc..5c117785e 100644 --- a/twidere/src/main/java/org/mariotaku/twidere/loader/PublicTimelineLoader.java +++ b/twidere/src/main/java/org/mariotaku/twidere/loader/PublicTimelineLoader.java @@ -42,7 +42,7 @@ public class PublicTimelineLoader extends MicroBlogAPIStatusesLoader { final String sinceId, final String maxId, final List data, final String[] savedStatusesArgs, final int tabPosition, boolean fromUser, boolean loadingMore) { - super(context, accountId, sinceId, maxId, data, savedStatusesArgs, tabPosition, fromUser, loadingMore); + super(context, accountId, sinceId, maxId, -1, data, savedStatusesArgs, tabPosition, fromUser, loadingMore); } @NonNull diff --git a/twidere/src/main/java/org/mariotaku/twidere/loader/RetweetsOfMeLoader.java b/twidere/src/main/java/org/mariotaku/twidere/loader/RetweetsOfMeLoader.java index 2d9b84e7b..0dc03f9ea 100644 --- a/twidere/src/main/java/org/mariotaku/twidere/loader/RetweetsOfMeLoader.java +++ b/twidere/src/main/java/org/mariotaku/twidere/loader/RetweetsOfMeLoader.java @@ -43,7 +43,7 @@ public class RetweetsOfMeLoader extends MicroBlogAPIStatusesLoader { final String sinceId, final String maxId, final List data, final String[] savedStatusesArgs, final int tabPosition, boolean fromUser, boolean loadingMore) { - super(context, accountKey, sinceId, maxId, data, savedStatusesArgs, tabPosition, fromUser, + super(context, accountKey, sinceId, maxId, -1, data, savedStatusesArgs, tabPosition, fromUser, loadingMore); } diff --git a/twidere/src/main/java/org/mariotaku/twidere/loader/TweetSearchLoader.java b/twidere/src/main/java/org/mariotaku/twidere/loader/TweetSearchLoader.java index 6e8c92481..6891d9bbc 100644 --- a/twidere/src/main/java/org/mariotaku/twidere/loader/TweetSearchLoader.java +++ b/twidere/src/main/java/org/mariotaku/twidere/loader/TweetSearchLoader.java @@ -44,7 +44,6 @@ public class TweetSearchLoader extends MicroBlogAPIStatusesLoader { @Nullable private final String mQuery; - private final int mPage; private final boolean mGapEnabled; public TweetSearchLoader(final Context context, final UserKey accountKey, @Nullable final String query, @@ -52,8 +51,8 @@ public class TweetSearchLoader extends MicroBlogAPIStatusesLoader { final List data, final String[] savedStatusesArgs, final int tabPosition, final boolean fromUser, final boolean makeGap, boolean loadingMore) { - super(context, accountKey, sinceId, maxId, data, savedStatusesArgs, tabPosition, fromUser, loadingMore); - mPage = page; + super(context, accountKey, sinceId, maxId, page, data, savedStatusesArgs, tabPosition, + fromUser, loadingMore); mQuery = query; mGapEnabled = makeGap; } @@ -99,8 +98,9 @@ public class TweetSearchLoader extends MicroBlogAPIStatusesLoader { protected void processPaging(@NonNull ParcelableCredentials credentials, int loadItemLimit, @NonNull Paging paging) { if (MicroBlogAPIFactory.isStatusNetCredentials(credentials)) { paging.setRpp(loadItemLimit); - if (mPage > 0) { - paging.setPage(mPage); + final int page = getPage(); + if (page > 0) { + paging.setPage(page); } } else { super.processPaging(credentials, loadItemLimit, paging); diff --git a/twidere/src/main/java/org/mariotaku/twidere/loader/UserFavoritesLoader.java b/twidere/src/main/java/org/mariotaku/twidere/loader/UserFavoritesLoader.java index 45df7aa99..afda7a436 100644 --- a/twidere/src/main/java/org/mariotaku/twidere/loader/UserFavoritesLoader.java +++ b/twidere/src/main/java/org/mariotaku/twidere/loader/UserFavoritesLoader.java @@ -29,9 +29,12 @@ import org.mariotaku.microblog.library.MicroBlogException; import org.mariotaku.microblog.library.twitter.model.Paging; import org.mariotaku.microblog.library.twitter.model.ResponseList; import org.mariotaku.microblog.library.twitter.model.Status; +import org.mariotaku.twidere.model.ParcelableAccount; import org.mariotaku.twidere.model.ParcelableCredentials; import org.mariotaku.twidere.model.ParcelableStatus; import org.mariotaku.twidere.model.UserKey; +import org.mariotaku.twidere.model.util.ParcelableAccountUtils; +import org.mariotaku.twidere.util.InternalTwitterContentUtils; import java.util.List; @@ -42,9 +45,10 @@ public class UserFavoritesLoader extends MicroBlogAPIStatusesLoader { public UserFavoritesLoader(final Context context, final UserKey accountKey, final UserKey userKey, final String screenName, final String sinceId, final String maxId, + final int page, final List data, final String[] savedStatusesArgs, final int tabPosition, boolean fromUser, boolean loadingMore) { - super(context, accountKey, sinceId, maxId, data, savedStatusesArgs, tabPosition, fromUser, + super(context, accountKey, sinceId, maxId, page, data, savedStatusesArgs, tabPosition, fromUser, loadingMore); mUserKey = userKey; mUserScreenName = screenName; @@ -64,6 +68,25 @@ public class UserFavoritesLoader extends MicroBlogAPIStatusesLoader { @WorkerThread @Override protected boolean shouldFilterStatus(final SQLiteDatabase database, final ParcelableStatus status) { - return false; + return InternalTwitterContentUtils.isFiltered(database, status, false); + } + + + @Override + protected void processPaging(@NonNull ParcelableCredentials credentials, int loadItemLimit, @NonNull Paging paging) { + switch (ParcelableAccountUtils.getAccountType(credentials)) { + case ParcelableAccount.Type.FANFOU: { + paging.setCount(loadItemLimit); + final int page = getPage(); + if (page > 0) { + paging.setPage(page); + } + break; + } + default: { + super.processPaging(credentials, loadItemLimit, paging); + break; + } + } } } diff --git a/twidere/src/main/java/org/mariotaku/twidere/loader/UserListTimelineLoader.java b/twidere/src/main/java/org/mariotaku/twidere/loader/UserListTimelineLoader.java index 1610a886e..ce17cddc1 100644 --- a/twidere/src/main/java/org/mariotaku/twidere/loader/UserListTimelineLoader.java +++ b/twidere/src/main/java/org/mariotaku/twidere/loader/UserListTimelineLoader.java @@ -46,7 +46,7 @@ public class UserListTimelineLoader extends MicroBlogAPIStatusesLoader { final UserKey userKey, final String screenName, final String listName, final String sinceId, final String maxId, final List data, final String[] savedStatusesArgs, final int tabPosition, boolean fromUser, boolean loadingMore) { - super(context, accountKey, sinceId, maxId, data, savedStatusesArgs, tabPosition, fromUser, loadingMore); + super(context, accountKey, sinceId, maxId, -1, data, savedStatusesArgs, tabPosition, fromUser, loadingMore); mListId = listId; mUserKey = userKey; mScreenName = screenName; diff --git a/twidere/src/main/java/org/mariotaku/twidere/loader/UserTimelineLoader.java b/twidere/src/main/java/org/mariotaku/twidere/loader/UserTimelineLoader.java index 9c11283bd..39df6e2d8 100644 --- a/twidere/src/main/java/org/mariotaku/twidere/loader/UserTimelineLoader.java +++ b/twidere/src/main/java/org/mariotaku/twidere/loader/UserTimelineLoader.java @@ -50,7 +50,7 @@ public class UserTimelineLoader extends MicroBlogAPIStatusesLoader { final String sinceId, final String maxId, final List data, final String[] savedStatusesArgs, final int tabPosition, boolean fromUser, boolean loadingMore) { - super(context, accountId, sinceId, maxId, data, savedStatusesArgs, tabPosition, fromUser, loadingMore); + super(context, accountId, sinceId, maxId, -1, data, savedStatusesArgs, tabPosition, fromUser, loadingMore); mUserId = userId; mUserScreenName = screenName; }