This separates it into two objects in order to make thead-safety easy
using Qt's signal/slot mechanism.
Additionally this removes magic timeout numbers and simply starts a
timer to check for changes and emit a signal if the status actually
needs updating.
Testing also shows that QML calls the getter a LOT, so I also moved the
broadcastStatus to be buffered and just return that on the call.
This incidentally also simplifies the code, double win.
We check the first block to figure out if the download is actually the
same one we are about to start, and if it is then Pay will not re-
download the part that is already on disk.
We set the UI to change from 'downloading' state to 'processing' state,
and now we give the UI the processor time to actually show this new
state on the screen before we start that processing step.
seems renaming a file that is mapped is not possible on Android, but
remove is. This code now removes the original static headers after we
get an approval of the downloaded file.
The ImportWalletPage now loads the QML provided by the module,
exposed via the metadata of modules.
The module gets just a blockheight property and then will do
"its thing".
This will either instantly close when there is nothing to do
and continue instantly to the actual import.
Or the module will check the server, initiate download and when
all is setup and done THEN close the popup and continue with
the actual import.
This actually checks the need for downloading more headers,
then decides on which headers to download (from which known checkpoint,
really) and downloads them to a file.
Plugins can be plugged into the main menu and the send menu already,
this adds the ability for a (section of a) plugin to be loaded as
custom component in the main app, among others.
This moves the component out to its own file while fixing some UX
issues.
* It is now always visible for (UI) discovery purposes.
* When we paste when there is no matching text we show negative
feedback.
A peer that has not yet handshaked is now show in this view, giving a
better indication of what is going on on platforms that do not have easy
access to a log file.
The final release should not include the example module as we aim
releases at normal people, not devs.
This makes the skipping of the example module part of the build
setup by simply passing in -Dskip_example=TRUE
to cmake.
This is likely the oldest component in the app and it was
really in need of a rewrite.
The state of peers is shown much clearer now, we use a proper
model in order to avoid the jumping and we use a more safe
way of getting at the data.
One surprise was that the main usecase of pasting is one where the user
activates another app to go and copy data in order to come back to paste
it.
And the Qt clipboard didn't manage to get any notification of clipboard
changes. Even copying data on becoming active had no effect.
So now I just show the paste optimistically when the user comes back
from another screen, assuming the main reason for that was to copy.
This makes available a clipboard helper component in QML.
Based on filters we then can make the 'paste' button visible and
only allow pasting stuff that is remotely useful.
This then also adds a 'paste' button to the transaction-building
module, the 'destination' screen.
Squash of 12 commits, this makes the UX actually useful and
we detect errors and show errors and warnings to the user.
This also adds an 'editable' bool to OutputDetail in order to
disable editing of a payment request address.
Additionally, this introduces the ability for a Payment to carry
a raw script instead of an address. So op-return or more complex
payment requests will be sent just fine.
Fun fact is that our broadcast is INV/SendData, which is two
roundtrips and thus slow, which is needed to be sure we get proper
rejection messages.
The sending of the transaction via BIP70 causes the network to
already know about the tx because the server we send it to has
likely much better Internet than we do.
So confirmation from the payment provider is used to show success
instead of the normal way.