Rework the visibleActions logic in SwipeListItem
ClosedPublic

Authored by leinir on Mon, Aug 12, 11:09 AM.

Details

Summary

visibleActions is really only used to check whether there are
any actions visible at all, the number is irrelevant. For some
unknown reason the old logic would occasionally get caught in
some out of order silliness (so we'd end up with a negative
number of visible actions), but with this logic we only check
whether there is any visible actions at all, so the whole thing
is less stateful.

Test Plan

Using Peruse on mobile, load up the Store and see that with the
old logic there are no handles on the items. With the new
logic there is.

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.
leinir created this revision.Mon, Aug 12, 11:09 AM
Restricted Application added a project: Kirigami. · View Herald TranscriptMon, Aug 12, 11:09 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
leinir requested review of this revision.Mon, Aug 12, 11:09 AM
leinir updated this revision to Diff 63658.Tue, Aug 13, 1:47 PM
  • Only check for other visible actions if this one is not visible
mart accepted this revision.Wed, Aug 14, 2:39 PM
This revision is now accepted and ready to land.Wed, Aug 14, 2:39 PM
This revision was automatically updated to reflect the committed changes.