Review Request 116824: Implementation of Single time addition on multiple clicks of the Play All button

Shantanu Tushar shantanu at kde.org
Sun Mar 16 03:44:59 UTC 2014



> On March 15, 2014, 7:43 p.m., Shantanu Tushar wrote:
> > In general I don't see why N clicks of a button won't repeat the action N times, sounds very logical to me. So not sure if it needs "fixing".
> 
> Harshit Agarwal wrote:
>     Agreed, but PlayAll should be a single click feature right?
>     Either we deactivate the button after a single click.

Why?


> On March 15, 2014, 7:43 p.m., Shantanu Tushar wrote:
> > browsingbackends/localfiles/localfilesabstractbackend.cpp, line 153
> > <https://git.reviewboard.kde.org/r/116824/diff/1/?file=254233#file254233line153>
> >
> >     Where is model1 set? I don't see it being assigned any value ever.
> 
> Harshit Agarwal wrote:
>     I'm actually assigning the current model value to model1 when the playAll button would be clicked. Since it is a global var, it would store the value of the previous model. And hence, when the next time a new call is initiated, it first checks with the previous model element, if the values are different, then only it adds the media to the playlist.
>     
>     Initially, i didn't assign any value to it, so the condition becomes true by default and the first click of the PlayAll button would always add the media

Hmm but I don't see any assignment to model1 at all in the diff, that is why I asked. Maybe you missed something?
This logic also means that if I Play All, clear the playlist, and then click Play All nothing will happen.

IMO, the whole "Play All should only work once" concept is flawed.


- Shantanu


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/116824/#review52999
-----------------------------------------------------------


On March 15, 2014, 6:58 p.m., Harshit Agarwal wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/116824/
> -----------------------------------------------------------
> 
> (Updated March 15, 2014, 6:58 p.m.)
> 
> 
> Review request for Plasma, Akshay Ratan, Shantanu Tushar, Sinny Kumari, and Sujith Haridasan.
> 
> 
> Repository: plasma-mediacenter
> 
> 
> Description
> -------
> 
> The "Play All" button when clicked multiple times, was adding all the media multiple times onto the playlist. This is resolved, and now it adds the media only single time if the button is clicked multiple times.
> 
> 
> Diffs
> -----
> 
>   browsingbackends/metadatabackends/metadatamusicbackend/metadatamusicbackend.cpp 8aaddcc 
>   browsingbackends/localfiles/localfilesabstractbackend.cpp faaafa7 
> 
> Diff: https://git.reviewboard.kde.org/r/116824/diff/
> 
> 
> Testing
> -------
> 
> It has been tested with the local files in Music as well as the Videos section. Patch found to be consistent.
> 
> 
> Thanks,
> 
> Harshit Agarwal
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20140316/b6818493/attachment.html>


More information about the Plasma-devel mailing list