After introduction of pay_mobile, we now have a static lib of all
classes that get linked to the unit tests, as such we can remove
optimizations that tried to keep the set of files to compile in tests
smaller.
This is a bit of a violation of layers, as a result of the ListView not
having any way to do this. Even in a hacky way.
The usecase is that we need to stop the listview scrolling and showing
new items that are being inserted at the top in some cases.
Specifically when the user taps on a single transaction in order to get
more information about it, at that point the popup should be displayed
next to the item we tapped on and that item should not move due to
there being new transactions found.
The freezeModel property accomplishes that by simply not telling the
model new data has been found as long as the property is true.
Afterwards all the updates that have accumulate are flushed.
This makes sure that after initial setup of the wallet we save the
private data and the wallet that was not owned by the user is stored as
such.
On Android the destructor often is not properly called, which leads to
us not saving this on shutdown and that showed this bug.
Move to the next eventloop event the usage of the camera (finding out
resolutions etc) which looks to help stability.
Also remove the init-on-startup again, which had the nasty side-effect of
turning on the camera for a very brief time due to some Qt bug that
ignores the 'active' boolean on the camera object.
QtMultimedia on Linux has the nasty bug that stopping the camera doens't
allow us to start it afterwards. So for now, while Qt is still buggy, lets
simply not stop it.
Notice that this is Linux only, where I expect this class to have very low
usage.
Android doesn't have this specific issue.
On mobile its more visible that it takes a couple of seconds to fetch
the price from the network. The result is that no prices are visible on
unconfirmed transactions and wallet balances for that time.
This instead uses the last known correct price from the historical
database as the price, so in that couple of seconds we are showing the
mostly correct data instead of no data.
When the price feed comes in, all values on screen get automatically
updated.
Move the signals to the right class and remove an include from the
header file.
Also provide a context object in QTimer::singleShot. Useful to avoid
dangling pointers being dereferenced on shutdown.
Turns out that the image-source concept takes a special URL which then
decodes our earlier encoded bip21 string. So we need to make sure we
encode it again before pushing it into a QR.
This shows all wallets and wallet details.
Additionally, this moves the AccountTypeLabel out of the desktop page to
be reusable. Not so much because its hard, but because they have
translations and we'd better push shared translations into the common
translation unit as opposed to duplicating it.
The LabelWithClipboard now has as default context-menu-item text "Copy"
instead of "Copy Address".
This adds some timers and similar hacks which seem to have a very
positive result on getting an actual picture consistently from the
camera.
Tested this on 3 actual phones, of different make and versions.
Fixes: #11
This adds a prettty cutout screen and better feedback on the camera view
popping up.
We also make visible the scan overlay instantly, hiding out any other UI
that is hidden beneath it.
We correctly handle various odd issues with Qt / Android.
- the permissions request (QFuture) returned in a different thread, we
now move back to the main thread before doing any calls on the
multimedia objects.
- The popping up of the android permissions requestor actually makes the
app think its being made inactive. Now we no longer cancel the QR scan
request in such cases.
Yesterdays refactor causes the OS defines to only be specified for the
shared library. This makes the app-specific compiles receive the define
again too.
Slowly the amount of cpp sources has been growing to the point
where its just too much to store in the root of the project.
I think they are more happy in a subdir as well, getting an elevated
position for themselves.