The power management turns off the network layer 90 seconds after
the application stops being in the foreground.
At least, that is what it is programmed to do. Unfortunately the
signals we listen to are not reliable across devices and many users
are reporting that this is triggered 90 seconds after start.
For now, turn off the saving feature in order to make sure that
the app operates normally for normal people.
In some locales the group separator is a unicode character that does not
fit in an 8 byte string, causing misrenderings.
We now assume that things fit in 16 bit characters which should fit all
living languages.
The Android system is so strict in its power management that a simple
request to have Pay run in the background at night for 20 seconds it is
required to completely turn off powermanagement for the app. An overkill
solution, but that is how it works now.
A nice history:
https://medium.com/its-tinkoff/android-background-restrictions-
b63e73fe508
Side-effect is that if the user granted the turning off of power
management we now have to add code to do it inside the app.
This commit checks when the app is hidden (screen turned off, other app
became front etc) then we wait for a timeout and then terminate
ourselves in order to avoid using more CPU.
When the user has had the screen locked long enough to make the app
lock, we just close the popup.
The unlock screen actually appears under popups (that's the concept of a
popup..) so this solves a leakage of data.
This is the only useful notification type we have today,
but at least it allows the user to explicitly go and request
notifications from the Android OS.
Use the new TextButton feature better for current setting
and make clear in the sub text which wallet this is for.
On the send tab the InstaPayConfigButton is directly next to the
default wallet, as such it may be assumed that the insta pay
text applied to the name mentioned there.
This lists the wallet here in order to make things clear and
now lists the actual limit on the right side for consistency.
This swaps the colors on the AccountHistory and ExploreModules
rounded rects in order to make the background universally the same
everywhere.
To make it work the 'light' color on the light theme had to remove
some of its contrast to the base color in order to not remove
contrast to the text.
On Android this enables the application to run just a simple
quick sync and then exit the app on regular intervals.
The main benefit is that when the user doesn't run the app very
often they will avoid having a long sync time.
Add logic to notice that the device is offline and notify the
user of this fact on screen.
Repeat checking so we can notify the user that network is back.
This shows in the UI (of the mobile form factor) that the device
is offline and we avoid starting the p2p layer until network
is detected to be there again.
This removes the various ifdef based differences which are platform
specific and instead moves the code to a file that will only be
compiled for that target platform.
We also remove the backwards compatible 'darktheme-from-system' code
which is by now no longer needed.