Bug 2002257 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

In the Downloads screen, add a new option "Rename" on the three-dot-menu for each download. 

When the user clicks "Rename", a Dialog opens, pre-filled with the current name. 
The part before the extension should be selected (to be clearer, the selection should exclude `.jpg´ in the case of `image.jpg` for example). 

The `Save` button should be disabled if: 
- the file name is empty
- the file name contains only an extension
- the file name is identical to the original name

When the user clicks the save button, if the file extension was changed, then show [a dialog](https://www.figma.com/design/d4VPwxnMK4nmaFvdlvfoIz/Mobile-Downloads?node-id=12125-20303&m=dev) to ask them if they really want to change the file extension. 

If the user hits "Cancel", bring them back to the "Rename" dialog.
If the user hits confirm, then rename the file on disk, and make sure the screen is updated with the new name. 

Also make sure that opening the file from the Downloads screen after renaming it works correctly.
In the Downloads screen, add a new option "Rename" on the three-dot-menu for each download. 

When the user clicks "Rename", a Dialog opens, pre-filled with the current name. 
The part before the extension should be selected (to be clearer, the selection should exclude `.jpg´ in the case of `image.jpg` for example), and the extension shouldn't be editable. (We will allow extension edition in Bug 2002331). 
We can use [this Figma](https://www.figma.com/design/d4VPwxnMK4nmaFvdlvfoIz/Mobile-Downloads?node-id=12125-18777&m=dev) that shows how the extension should look like.

The `Save` button should be disabled if: 
- the file name contains only an extension
- the file name is identical to the original name

Make sure that opening the file from the Downloads screen after renaming it works correctly.

Back to Bug 2002257 Comment 0