files-community / Files

Building the best file manager for Windows
https://files.community
MIT License
33.57k stars 2.14k forks source link

Bug: When a ZIP file is opened via file association, the Extract Button is not displayed on the toolbar #15457

Open sharpninja opened 3 months ago

sharpninja commented 3 months ago

Description

I have Files set as my default handler for Zip files. When I download a zip file in MS Edge and then open that zip file from Edge, Files is opened as expected, but the Extract button is not visible.

image

If Files loses focus and regains focus, the extract button will show up on the refresh.

image

Steps To Reproduce

  1. Set Files as the default handler for ZIP files
  2. Download a ZIP File in MS Edge
  3. Open the downloaded ZIP file in MS Edge
  4. Once Files opens, notice that there is no Extract button
  5. Switch focus to a different application in Windows.
  6. Switch focus back to Files, notice that the Extract button will appear.

Requirements

Files Version

3.4.0.0

Windows Version

10.0.22621.3593

Log File

debug.log

yaira2 commented 3 months ago

Thank you for the report

sharpninja commented 3 months ago

Just noticed an update is available, so I updated to 3.4.1.0 and problem remains.

ashrafmansuri commented 3 months ago

I would like to solve this. Can I know where the AddressToolbarViewModel gets its Data from?

0x5bfa commented 3 months ago

This button's visibility is managed by the view model of the toolbar.

image

ashrafmansuri commented 3 months ago

This button's visibility is managed by the view model of the toolbar.

image

I checked and I can find it being true. But the button is still not visible.

ashrafmansuri commented 3 months ago

AddressToolBarViewModel is called twice once for Home and second time for the zip file. CanExtract is true for the zip file, but I think it overrides its CanExtract with Home.