After starting to use Qt6.10 the following (trivial) steps caused
the application to crash with a backtrace 100% inside of Qt.
a. scroll the list of transactions down a bit.
b. select a different wallet.
c. boom
The bug seems to be that changing the model of a Listview crashes
if the view is not positioned at the top.
This new code positions the view at the top prior to changing the model.
This fixes the weird dialog not getting a press but just closing problem
which seems to stem from the horizontal listview getting its current
index set. So we just avoid doing that.
This fixes the bug in the last release where not having the payments tab
visible meant we didn't see the tabbar at all. The logic is now fixed to
include the fact that we can have a tokens tab too.
This makes the spacing between them equal, making the checkbox take more
space (making fat fingered people happier) and the radio button takes
half the space because frankly it was ugly empty.
This adds a lot of plumbing in the TokensManager and MetadataRepository
to parse the data we have and extract what we need.
The actual visual display is rather simple, this is expected to evolve
as this becomes more nature. For now this works and that is the
important part.
This avoids problems with needing to tap it twice to show and allows for
better reuse of our own components and makes sizing and positioning not
black magic.
When a repeat payment is detected to soon be eligable for sending, but
the user has not approve it yet, we show a notification from the
background process to entice the users to go and approve it.
This popup now also carries a 'disable' text which disables the repeat
payment, effectively shutting up this and further notifications.
The tricky part to make this work is that the notification is showing
while the application is (likely) not actually active.
This takes the strategy that the notification carries some extra
details. Among others a newly introduced unique id for a notification
itself, and also some text to show on actually processing the disable
action.
The processing just writes a file, to avoid complexity and side-effects.
The file will then be read on start up (either foreground of background)
to action on the lines in there. So the item will be disabled on first
load.
When the title and the 'current value' text are both long, typically
with a huge font selected, they now avoid overlapping by moving the
value label down.