Repository navigation
fix(mobile): hide the hidden-files toggle in directories with no dot entries - #672
Merged
Merged
Conversation
…entries The session-files toolbar showed the eye icon for every directory, including empty ones, where tapping it does nothing. Render it only when the current listing actually contains a dot entry.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
手机端「会话文件」面板的工具栏一直显示眼睛图标(显示/隐藏隐藏文件),即使当前目录里根本没有任何以
.开头的隐藏文件或隐藏目录,点它也没有任何效果。改动
SessionFilesPanel:根据未过滤的目录列表计算hasHidden,只有当前目录确实存在点开头的条目时才渲染眼睛按钮;空目录、纯普通文件目录只保留刷新按钮。entries在开关关闭时已经滤掉隐藏项),所以在开关打开/关闭两种状态下都不会误隐藏按钮。验证
桌面端 (
desktop/src/features/filetree/FileTreePanel.tsx) 是带文字的复选框,且树是懒加载根路径,未在本次改动范围内。