TimelineItem grew to be a pretty big component for a ListView delegate that is supposed to be lightweight. Most of its content belongs to it; but some things really don't, mainly things that don't depend on a particular item context (basically, everything that doesn't depend on model roles) and things that could be calculated on C++ side instead of doing it in JavaScript. This PR moves things around to make item instantiation lighter.
There's yet another problem with the TimelineItem - it's stateful in the part of showing/hiding the details. This is counter to Qt guidelines, which strongly advise to not put any kind of state in a delegate. This problem should be addressed separately.
TimelineItem grew to be a pretty big component for a ListView delegate that is supposed to be lightweight. Most of its content belongs to it; but some things really don't, mainly things that don't depend on a particular item context (basically, everything that doesn't depend on model roles) and things that could be calculated on C++ side instead of doing it in JavaScript. This PR moves things around to make item instantiation lighter.
There's yet another problem with the TimelineItem - it's stateful in the part of showing/hiding the details. This is counter to Qt guidelines, which strongly advise to not put any kind of state in a delegate. This problem should be addressed separately.