Skip to content

Commit

Permalink
fix: MenuItem State hasn't changed
Browse files Browse the repository at this point in the history
  • Loading branch information
aikrq committed Dec 28, 2024
1 parent b9f5eaf commit 371284d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/src/main/java/mod/khaled/logcat/LogReaderActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ private void initialize() {
((Adapter) binding.logsRecyclerView.getAdapter()).deleteAll();
} else if (id == R.id.action_auto_scroll) {
autoScroll = !item.isChecked();
item.setChecked(autoScroll);
if (autoScroll) {
binding.logsRecyclerView.getLayoutManager().scrollToPosition(binding.logsRecyclerView.getAdapter().getItemCount() - 1);
}
Expand Down

0 comments on commit 371284d

Please sign in to comment.