Skip to content

Commit

Permalink
refactor: Apply suggestion from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasBourdin88 committed Feb 25, 2025
1 parent 507cb60 commit 6629933
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,10 @@ class PreviewHeaderView @JvmOverloads constructor(
}
}

fun setPageNumberVisibility(isVisible: Boolean) {
binding.pageNumberChip.isVisible = isVisible
binding.pageNumberChip.isFocusable = false
fun setPageNumberVisibility(isVisible: Boolean) = with(binding.pageNumberChip) {
this.isVisible = isVisible
// Set focusable to false to prevent unnecessary focus events during keyboard navigation.
isFocusable = false
}

fun setPageNumberValue(currentPage: Int, totalPage: Int) {
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/layout/fragment_file_list.xml
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,7 @@
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:touchscreenBlocksFocus="true">
android:fillViewport="true">

<com.infomaniak.drive.views.NoItemsLayoutView
android:id="@+id/noFilesLayout"
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/layout/fragment_home.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
android:id="@+id/collapsingToolbarLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:touchscreenBlocksFocus="false"
app:layout_scrollFlags="scroll|exitUntilCollapsed|snap">

<com.google.android.material.appbar.MaterialToolbar
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/layout/fragment_preview_slider.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@
android:id="@+id/viewPager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:focusable="false"
android:focusableInTouchMode="false"
android:touchscreenBlocksFocus="true"
android:saveEnabled="false" />

Expand Down

0 comments on commit 6629933

Please sign in to comment.