Skip to content

Commit

Permalink
create a method to reset folder name visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
tevincent committed Feb 15, 2024
1 parent 50c9107 commit 3d5fe71
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ class ThreadListAdapter @Inject constructor(
private fun shouldDisplayFolderName(folderName: String) = isFolderNameVisible && folderName.isNotEmpty()

private fun CardviewThreadItemBinding.displayThread(thread: Thread, position: Int) {

resetFolderNameVisibility()
displayFolderName(thread)

refreshCachedSelectedPosition(thread.uid, position) // If item changed position, update cached position.
Expand Down Expand Up @@ -248,11 +248,15 @@ class ThreadListAdapter @Inject constructor(
),
)
} else {
folderNameExpandMode.isVisible = false
folderNameCompactMode.isVisible = false
resetFolderNameVisibility()
}
}

private fun CardviewThreadItemBinding.resetFolderNameVisibility() {
folderNameExpandMode.isVisible = false
folderNameCompactMode.isVisible = false
}

private fun CardviewThreadItemBinding.onThreadClickWithAbilityToOpenMultiSelection(
thread: Thread,
listener: MultiSelectionListener<Thread>,
Expand Down

0 comments on commit 3d5fe71

Please sign in to comment.