Skip to content

Commit

Permalink
Improved search view - collapse empty path view
Browse files Browse the repository at this point in the history
  • Loading branch information
izderadicka committed Feb 19, 2019
1 parent a96ded5 commit c97d853
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,15 @@ class FolderAdapter(val context: Context, val isSearch:Boolean,
}

if (holder.isSearch) {
holder.folderPathView?.text = pathFromFolderId(item.mediaId!!)
val path = pathFromFolderId(item.mediaId!!)
holder.folderPathView?.apply {
text = path
if (path.isNullOrBlank()) {
visibility = View.GONE
} else {
visibility = View.VISIBLE
}
}
}
}

Expand Down

0 comments on commit c97d853

Please sign in to comment.