This commit is contained in:
LoveSy 2021-08-27 01:44:22 +08:00 committed by GitHub
parent 7c706a31d4
commit 6e07bfb71e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -22,6 +22,8 @@ package org.lsposed.manager.ui.fragment;
import static org.lsposed.manager.App.TAG;
import static java.lang.Math.max;
import android.annotation.SuppressLint;
import android.os.AsyncTask;
import android.os.Bundle;
@ -153,7 +155,7 @@ public class LogsFragment extends BaseFragment {
if (adapter.getItemCount() - layoutManager.findLastVisibleItemPosition() > 1000) {
binding.recyclerView.scrollToPosition(adapter.getItemCount() - 1);
} else {
binding.recyclerView.smoothScrollToPosition(adapter.getItemCount() - 1);
binding.recyclerView.smoothScrollToPosition(max(adapter.getItemCount() - 1, 0));
}
} else if (itemId == R.id.menu_refresh) {
reloadErrorLog();