Don't show context drawer if all actions are invisible
ClosedPublic

Authored by nicolasfella on Oct 14 2019, 11:20 PM.

Details

Summary

Discover can be in a state where the only action in the context drawer is invisible. In that case an expty drawer just with the work "Actions" is shown, which isn't pretty.

Test Plan

Tested with affected discover page and unaffected KDE Connect page in mobile mode

Diff Detail

Repository
R169 Kirigami
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
nicolasfella created this revision.Oct 14 2019, 11:20 PM
Restricted Application added a project: Kirigami. · View Herald TranscriptOct 14 2019, 11:20 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
nicolasfella requested review of this revision.Oct 14 2019, 11:20 PM
mart accepted this revision.Oct 16 2019, 8:01 AM
This revision is now accepted and ready to land.Oct 16 2019, 8:01 AM
This revision was automatically updated to reflect the committed changes.

Assuming this is a proper JS Array

var somethingVisible = root.actions.some(function(item) {
    return item.visible;
});