settings-view icon indicating copy to clipboard operation
settings-view copied to clipboard

Updates panel does not retain updating state correctly

Open winstliu opened this issue 8 years ago • 1 comments

Prerequisites

  • [x] Put an X between the brackets on this line if you have done all of the following:
    • Reproduced the problem in Safe Mode: http://flight-manual.atom.io/hacking-atom/sections/debugging/#using-safe-mode
    • Followed all applicable steps in the debugging guide: http://flight-manual.atom.io/hacking-atom/sections/debugging/
    • Checked the FAQs on the message board for common solutions: https://discuss.atom.io/c/faq
    • Checked that your issue isn't already filed: https://github.com/issues?utf8=✓&q=is%3Aissue+user%3Aatom
    • Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages

Description

Discovered by @Ben3eeE. When updating a package and navigating to another settings view panel and then back to Updates, the package no longer displays as updating and you can press the update button again. This causes multiple problems, such as the status bar tile displaying "2/1 updating", multiple restart notifications, and errors.

Steps to Reproduce

  1. Downgrade a package, or have a package that has an update available
  2. Open the Settings View and click on the Updates panel
  3. Update the package
  4. Click on a different panel, for example Themes
  5. Click back to Updates

Expected behavior: Package still displays as "Updating..."

Actual behavior: "Update to x.y.z" appears

Reproduces how often: 100%

Versions

You can get this information from copy and pasting the output of atom --version and apm --version from the command line. Also, please include the OS and what version of the OS you're running.

Atom    : 1.15.0-dev-d5785a1
Electron: 1.4.13
Chrome  : 53.0.2785.143
Node    : 6.5.0
apm  1.15.1
npm  3.10.5
node 4.4.5 x64
python 2.7.12
git 2.10.0.windows.1
visual studio 2015

Windows 10 x64.

Additional Information

None.

winstliu avatar Jan 18 '17 16:01 winstliu

Ok, this is because the updates container is cleared and new package cards are initialized each time. Seems wasteful.

winstliu avatar Jan 20 '17 23:01 winstliu