UI: separate files in trash from rest of file tree
Any files/folders that are in the tablet's Trash folder show up on the top level of the UI's documents page. They should instead be shown in a separate "Trash" folder, or just hidden from the UI altogether.
Whenever a client requests the documents UI, a warning message is generated for each file that is in the trash, presumably because it doesn't know what folder to show it under.
Apr 29 21:37:52 raspberrypi rmfakecloud-armv7[22860]: time="2021-04-29T21:37:52+01:00" level=info msg="[GIN] 2021/04/29 - 21:37:52 | 304 | 216.165µs | 51.171.96.109 | GET \"/documents\""
Apr 29 21:37:53 raspberrypi rmfakecloud-armv7[22860]: time="2021-04-29T21:37:53+01:00" level=info msg="[ui-authmiddleware] User from token: murchu27"
**Apr 29 21:37:53 raspberrypi rmfakecloud-armv7[22860]: time="2021-04-29T21:37:53+01:00" level=warning msg="parent not found: trash"**
Apr 29 21:37:53 raspberrypi rmfakecloud-armv7[22860]: time="2021-04-29T21:37:53+01:00" level=info msg="[GIN] 2021/04/29 - 21:37:53 | 200 | 27.189767ms | 51.171.96.109 | GET \"/ui/api/documents\""
Apr 29 21:37:53 raspberrypi rmfakecloud-armv7[22860]: time="2021-04-29T21:37:53+01:00" level=info msg="[GIN] 2021/04/29 - 21:37:53 | 200 | 1.181601ms | 51.171.96.109 | GET \"/favicon.ico\""
The metadata of a file in the trash is like so:
reMarkable: ~/.local/share/remarkable/xochitl/ cat 4906df0c-5d5f-43e4-acdb-d1d5b570983d.metadata
{
"deleted": false,
"lastModified": "1619728667344",
"lastOpenedPage": 0,
"metadatamodified": false,
"modified": false,
"parent": "trash",
"pinned": false,
"synced": true,
"type": "DocumentType",
"version": 2,
"visibleName": "Weekly Schedules copy"
}
Hopefully this will be helpful in getting the UI to identify and filter these files/folders.
ok, should be no longer shown, the trash will be added later to the UI, probably
Crazy turnaround, thanks a mil. I'll take a look tomorrow. Will probably leave this issue open until a decision is made about adding trash to the UI
File/folders in the trash are hidden in the UI now, just like you said, thanks for that!