bruns requested changes to this revision.
bruns added a comment.
This revision now requires changes to proceed.


  This is just much to complicated, adding layer over layer does not help.
  
  Also, the second problem is unrelated to the change you mention - the 
"hasMessage" property could only be true for one DeviceItem, before and after.

INLINE COMMENTS

> DeviceItem.qml:50
>  
> -    readonly property bool hasMessage: statusSource.lastUdi == udi && 
> statusSource.data[statusSource.last] ? true : false
> -    readonly property var message: hasMessage ? 
> statusSource.data[statusSource.last] || ({}) : ({})
> +    readonly property bool hasMessage: statusSource.trigger && 
> statusSource.lastMessages[udi]
> +    readonly property var message: hasMessage ? 
> statusSource.lastMessages[udi] : ({})

trigger is essentially always true

> DeviceItem.qml:125
>              // otherwise the last message will show again when this device 
> reappears
> -            statusSource.clearMessage()
> +            statusSource.clearMessage(udi)
>  

the item should not mess with the internals of the statusSource

> FullRepresentation.qml:108
>              if (!plasmoid.expanded) {
> -                statusSource.clearMessage()
> +                statusSource.clearMessages()
>              }

This is IMHO wrong, if the plasmoid shows an error message and I happen to 
close it by clicking elsewhere, I can no longer see the error message, although 
it still applies

> FullRepresentation.qml:181
>              state: sdSource.data[udi] ? sdSource.data[udi].State : 0
> -            isRoot: sdSource.data[udi]["File Path"] === "/"
> +            isRoot: sdSource.data[udi] ? sdSource.data[udi]["File Path"] === 
> "/" : false
>  

This is an unrelated change, and fixes an error introduced in 
https://phabricator.kde.org/R120:d1a5507bd57aa74c18392354dcd43b65e15ee491

> devicenotifier.qml:218
> +                // Source is formatted as follows: "<udi> notification"
> +                var udi = sources[i].split(' ')[0]
> +                if (data[sources[i]].error.length > 0) {

would be much simpler to use `udi = data[sources[i]].udi`

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D19796

To: thsurrel, #plasma, broulik, bruns
Cc: anthonyfieroni, plasma-devel, jraleigh, GB_2, ragreen, Pitel, ZrenBot, 
himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart

Reply via email to