Open puittenbroek opened 7 years ago
The first is easiliy done by making the tile configurable and adding a (bool?) field for 'show latest poll'. 'Dropping' a poll on the tile should set the 'show latest poll' to False. Reverse, setting 'show latest poll' should empty any saved uid pointing to a poll. So you always have either a poll-uid, or a 'latest' flag. Never both.
that could be complicated.
Perhaps, but otherwise we the 'latest poll' flag should precede the object :thinking: And populating with object can easily turn that flag off. Did some testing, it's not so easy to clear the saved poll in the tile when turning on the 'show latest poll' flag :/
So I guess the 'preceding' part is the way to go?
yes, that sounds good: if use latests is set we just ignore the UUID on the tile; sound easy.
Should you create a cover page with a poll-tile without any polls, it will break. In #89 MR I added some checks to avert this, but the logic itself is implicit. Insert a poll inot the tile, if not .. we try to find the most recent closed one to show. This is a bit random IMHO.
I propose the following changes:
So the usage of the tile is as followed: