Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

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

Offen Anfängerfreundlich
#17,845 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
1/5
Geschätzter Aufwand
Unter einer Stunde
Anfängerfreundlichkeit
86/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
android, kotlin
Bereich
mobile

Rechercherichtung

Beginne in FileActionsBottomSheet.handleState() und untersuche, wie displayActions() und displayLockInfo() Zeilen zum Sheet hinzufügen. Das Issue benennt die Aufrufreihenfolge, durch die die Aktionen übersprungen werden, und schlägt vor, die Aktionen vor den Sperrinformationen darzustellen. Fertig ist es, wenn eine gesperrte Datei ihre regulären Aktionen zusammen mit den Sperrinformationen anzeigt; die Payload nennt keine Testdatei.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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

Vorherrschende Sprache
Kotlin
Sterne
5.6k
Forks
2k
Ø Merge
2 T. 11 Std.
Gemergte PRs (30 T.)
97

Entwicklungsumgebung

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus nextcloud/android

Alle Issues in nextcloud/android

Ähnliche Issues

Weitere Issues zu Kotlin

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.