From e1cff312e13a88895c02f42a11942bb7f071c471 Mon Sep 17 00:00:00 2001 From: Kosh Date: Sun, 28 May 2017 18:13:26 +0800 Subject: [PATCH] this commit fixes #561 and releasing 2.5.2 --- app/build.gradle | 4 ++-- .../main/java/com/fastaccess/helper/PrefGetter.java | 2 +- .../notification/NotificationSchedulerJobTask.java | 2 +- .../main/pullrequests/MyPullRequestFragment.java | 11 +---------- app/src/main/res/values/strings.xml | 4 +++- 5 files changed, 8 insertions(+), 15 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 9ffefe066..50fdf9a23 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -28,8 +28,8 @@ android { applicationId "com.fastaccess.github" minSdkVersion 21 targetSdkVersion 26 - versionCode 251 - versionName "2.5.1" + versionCode 252 + versionName "2.5.2" signingConfig signingConfigs.signing buildConfigString "GITHUB_CLIENT_ID", (buildProperties.secrets['github_client_id'] | buildProperties.notThere['github_client_id']).string buildConfigString "GITHUB_SECRET", (buildProperties.secrets['github_secret'] | buildProperties.notThere['github_secret']).string diff --git a/app/src/main/java/com/fastaccess/helper/PrefGetter.java b/app/src/main/java/com/fastaccess/helper/PrefGetter.java index e0da31ab9..17c0d443d 100644 --- a/app/src/main/java/com/fastaccess/helper/PrefGetter.java +++ b/app/src/main/java/com/fastaccess/helper/PrefGetter.java @@ -199,7 +199,7 @@ public static int notificationDurationMillis(@NonNull String prefValue) { return (60 * 3) * 60; // 3 hours } } - return 0; + return -1; } public static boolean isTwiceBackButtonDisabled() { diff --git a/app/src/main/java/com/fastaccess/provider/tasks/notification/NotificationSchedulerJobTask.java b/app/src/main/java/com/fastaccess/provider/tasks/notification/NotificationSchedulerJobTask.java index 099fd2438..5f931419a 100644 --- a/app/src/main/java/com/fastaccess/provider/tasks/notification/NotificationSchedulerJobTask.java +++ b/app/src/main/java/com/fastaccess/provider/tasks/notification/NotificationSchedulerJobTask.java @@ -84,7 +84,7 @@ public class NotificationSchedulerJobTask extends JobService { public static void scheduleJob(@NonNull Context context) { int duration = PrefGetter.getNotificationTaskDuration(); - scheduleJob(context, duration == 0 ? THIRTY_MINUTES : duration, false); + scheduleJob(context, duration, false); } public static void scheduleJob(@NonNull Context context, int duration, boolean cancel) { diff --git a/app/src/main/java/com/fastaccess/ui/modules/main/pullrequests/MyPullRequestFragment.java b/app/src/main/java/com/fastaccess/ui/modules/main/pullrequests/MyPullRequestFragment.java index baf70af25..fe01841ce 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/main/pullrequests/MyPullRequestFragment.java +++ b/app/src/main/java/com/fastaccess/ui/modules/main/pullrequests/MyPullRequestFragment.java @@ -6,7 +6,6 @@ import android.support.annotation.Nullable; import android.support.annotation.StringRes; import android.support.v4.widget.SwipeRefreshLayout; -import android.support.v7.widget.RecyclerView; import android.view.View; import com.fastaccess.R; @@ -109,15 +108,7 @@ public static MyPullRequestFragment newInstance(@NonNull IssueState issueState, @NonNull @Override public OnLoadMore getLoadMore() { if (onLoadMore == null) { - onLoadMore = new OnLoadMore(getPresenter()) { - @Override protected void onShow(RecyclerView recyclerView) { - super.onShow(recyclerView); - } - - @Override protected void onHide(RecyclerView recyclerView) { - super.onHide(recyclerView); - } - }; + onLoadMore = new OnLoadMore<>(getPresenter()); } onLoadMore.setParameter(issueState); return onLoadMore; diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 294782194..3195b1b51 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -217,7 +217,7 @@ Team Deleted Unknown - Comment on commit + Commented on commit Organization Card Project @@ -458,4 +458,6 @@ Error loading image, please try again. Trending Sort by emojies is not really working due to GitHub limitation + Scroll Up + Scroll down \ No newline at end of file