Bug 388916

Summary: Install button doesn't disable or become something else during installation of Snap app
Product: [Applications] Discover Reporter: Nate Graham <nate>
Component: Snap BackendAssignee: Aleix Pol <aleixpol>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Clicked the install button three times
The button still doesn't disable

Description Nate Graham 2018-01-13 16:39:49 UTC
Created attachment 109838 [details]
Clicked the install button three times

Discover with the Snap backend compiled from git master on KDE Neon

When I click the install button to install a Snap app, it doesn't get disabled or turn into something else during installation. As a result, you can click it multiple times, with odd results. See attached screenshot.
Comment 1 Aleix Pol 2018-01-15 02:18:35 UTC
Git commit 3193c6f19b96425278915f045a3ee662cb6093bc by Aleix Pol.
Committed on 15/01/2018 at 02:14.
Pushed by apol into branch 'master'.

Report progress on snaps

M  +8    -1    libdiscover/backends/SnapBackend/SnapTransaction.cpp

https://commits.kde.org/discover/3193c6f19b96425278915f045a3ee662cb6093bc
Comment 2 Nate Graham 2018-01-15 02:45:31 UTC
Hmm, even with that commit, the Install button still doesn't change or deactivate, so you can still click it multiple times.
Comment 3 Aleix Pol 2018-01-15 18:33:15 UTC
Git commit c947d6f9571b72632bb2b50e29b62e89bbb4fab7 by Aleix Pol.
Committed on 15/01/2018 at 18:29.
Pushed by apol into branch 'Plasma/5.12'.

snap: Set the downloading status to the transaction

Otherwise the TransactionListener (hence the button) doesn't consider it
active

M  +1    -1    libdiscover/backends/SnapBackend/SnapTransaction.cpp

https://commits.kde.org/discover/c947d6f9571b72632bb2b50e29b62e89bbb4fab7
Comment 4 Nate Graham 2018-01-15 19:32:58 UTC
Created attachment 109888 [details]
The button still doesn't disable

Hmm, either something is weird with my Snap installation, or this still isn't fixed as of that commit. I'm attaching a video.
Comment 5 Nate Graham 2018-01-15 21:28:10 UTC
Sorry, I hadn't realized that the work was done on the 5.12 branch, and I was still building from master. I can confirm that the button works properly now. Sorry for the noise!