From 240cdf5701ef00ebfaefafb9d7ace22c0732bce0 Mon Sep 17 00:00:00 2001 From: M M Arif Date: Fri, 13 Nov 2020 16:04:43 +0100 Subject: [PATCH] Fix pr pagination (#770) links improvement Fix button alignment in polling delay popup Fix pr pagination Co-authored-by: M M Arif Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/770 --- .../mian/gitnex/activities/SettingsNotificationsActivity.java | 2 +- .../java/org/mian/gitnex/fragments/PullRequestsFragment.java | 4 ++-- app/src/main/res/layout/list_issue_comments.xml | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/mian/gitnex/activities/SettingsNotificationsActivity.java b/app/src/main/java/org/mian/gitnex/activities/SettingsNotificationsActivity.java index 2d6ed1f3..2ba73e5e 100644 --- a/app/src/main/java/org/mian/gitnex/activities/SettingsNotificationsActivity.java +++ b/app/src/main/java/org/mian/gitnex/activities/SettingsNotificationsActivity.java @@ -80,7 +80,7 @@ public class SettingsNotificationsActivity extends BaseActivity { Toasty.info(appCtx, getResources().getString(R.string.settingsSave)); }); - builder.setNegativeButton(R.string.cancelButton, (dialog, which) -> dialog.dismiss()); + builder.setNeutralButton(R.string.cancelButton, (dialog, which) -> dialog.dismiss()); builder.setView(numberPicker); builder.create().show(); }); diff --git a/app/src/main/java/org/mian/gitnex/fragments/PullRequestsFragment.java b/app/src/main/java/org/mian/gitnex/fragments/PullRequestsFragment.java index d893c8df..805c7d06 100644 --- a/app/src/main/java/org/mian/gitnex/fragments/PullRequestsFragment.java +++ b/app/src/main/java/org/mian/gitnex/fragments/PullRequestsFragment.java @@ -96,7 +96,7 @@ public class PullRequestsFragment extends Fragment { adapter = new PullRequestsAdapter(getContext(), prList); adapter.setLoadMoreListener(() -> recyclerView.post(() -> { - if(prList.size() == 10 || pageSize == resultLimit) { + if(prList.size() == resultLimit || pageSize == resultLimit) { int page = (prList.size() + resultLimit) / resultLimit; loadMore(Authorization.get(getContext()), repoOwner, repoName, page, tinyDb.getString("repoPrState"), resultLimit); @@ -125,7 +125,7 @@ public class PullRequestsFragment extends Fragment { adapter = new PullRequestsAdapter(context, prList); adapter.setLoadMoreListener(() -> recyclerView.post(() -> { - if(prList.size() == 10 || pageSize == resultLimit) { + if(prList.size() == resultLimit || pageSize == resultLimit) { int page = (prList.size() + resultLimit) / resultLimit; loadMore(Authorization.get(getContext()), repoOwner, repoName, page, tinyDb.getString("repoPrState"), resultLimit); diff --git a/app/src/main/res/layout/list_issue_comments.xml b/app/src/main/res/layout/list_issue_comments.xml index 07525a85..f57893b3 100644 --- a/app/src/main/res/layout/list_issue_comments.xml +++ b/app/src/main/res/layout/list_issue_comments.xml @@ -69,6 +69,8 @@ android:layout_marginTop="15dp" android:textColor="?attr/primaryTextColor" android:textIsSelectable="true" + android:autoLink="web" + android:textColorLink="@color/lightBlue" android:textSize="14sp" />