Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[Bug] File action sheet shows no actions at all for locked files

未关闭 适合新手
#17,845 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
1/5
预计耗时
1 小时以内
新手友好度
86/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
android, kotlin
领域
mobile

调研方向

从 FileActionsBottomSheet.handleState() 开始,检查 displayActions() 和 displayLockInfo() 如何向工作表添加行。issue 指出了导致操作被跳过的调用顺序,并建议先显示操作,再显示锁定信息。锁定的文件同时显示常规操作和锁定信息时,即为完成;payload 未指定测试文件。

由索引模型根据 Issue 内容生成。

描述

Steps to reproduce

  1. Lock a file (e.g. open a document in the Text or OnlyOffice app, or use "Lock file" from another client).
  2. In the Android app, open the folder that contains the locked file.
  3. Tap the three-dot menu of that file.

Actual behaviour

The bottom sheet shows the file name and a "Locked by the app …" row, but no actions at all — not even edit, rename, download or delete. The sheet is short and cannot be expanded by dragging.

Expected behaviour

The regular action list is shown, plus the lock information row.

Cause

FileActionsBottomSheet.handleState() calls displayLockInfo() before displayActions():

if (state.lockInfo != null) {
    displayLockInfo(state.lockInfo)
}
displayActions(state.titleFile, state.actions)

displayActions() starts with if (binding.fileActionsList.isNotEmpty()) return, so as soon as the lock row has been appended, every action is skipped. Only the lock row ends up in the sheet.

Suggested fix

Render the actions first and append the lock info afterwards:

displayActions(state.titleFile, state.actions)
if (state.lockInfo != null) {
    displayLockInfo(state.lockInfo)
}

This is also what makes the unlock action reachable — see #17838.

Environment

  • Nextcloud Android 35.0.1 (Play) and current master, Android 16, Pixel 9 Pro
  • Server: Nextcloud 34 (AIO), files_lock 34.0.1

🤖 Generated with Claude Code

主要语言
Kotlin
星标
5.6k
派生
2k
平均合并
2 天 11 小时
30 天内合并 PR
97

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

nextcloud/android 的其他 Issue

查看 nextcloud/android 的全部 Issue

相似的 Issue

更多 Kotlin Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。