show the chat name in front of the webxdc name to
- prevent phishing (the window will not show just the name of your bank)
- give the user an idea about where the webxdc sends messages to
(important eg. when using the same webxdc from different chats)
the UI does not check before selection if a message can be resent,
this is subject to change and not worth the effort.
instead, just an error is shown.
for the ID_NEVER_SHOW_AS_ACTION_* - this is a bit ugly,
however, the few alternatives i tried were even more uglier,
Java and Array-primitives are just not great.
as it is not changed often, it is probably not worth the effort to dive deeper.
* Fix off-by-one-error
* Wait longer with refreshing shortcuts to make sure that it doesn't affect the start of the activity
* Don't unnecessarily clear "screenshot security" flag
If this setting is off, the flag will never be added, so no need to
remove it.
Marking the message as seen starts ephemeral timer if it is not
already started.
Due to the bug in the core, sometimes messages were marked as seen
without starting ephemeral timer. This can also happen due to other
errors, like database access timeout.
Always calling markseenMsgs whenever the message is displayed, even if
it is already seen, ensures that ephemeral timer is started
eventually.
* enable Window.sessionStorage, Window.localStorage and IndexedDB APIs
* scope localStorage per message
when using a custom scheme as `webxdc`,
different messages will share the same localStorage,
even though different domains are in use.
not sure if that is an Android bug, however,
using `https` as the scheme scopes messages correctly,
so we are just using that.
- in bubbles, just say "Webxdc",
the text is replaced by the summary set by the app -
this is also the reason, why more useful information are not-so-good here,
it will not be shown often, and that may be irritating.
in case of the bytesize - we also do not show bytesize stickers etc.,
users can get it always at message-info.
- for drafts, we say "Tap to open",
maybe a start-button may be nice as well, however, that is some more work,
and it is not even clear we want to keep that button in the bubbles.
- Before Android 6 (API 23), there was no KeyStore yet. Currently, you can still create an encrypted account, but the passphrase is stored in clear-text, because that's how Signal is doing things.
- There is no option to manually set the keyphrase or to unlock via fingerprint. This has the advantage that we never need user input for unlocking the accounts and can simply unlock all accounts on startup and the obvious disadvantage that anyone with access to the unlocked device can open DC.
- Each account is encrypted with a different passphrase.
- When importing, you can choose to encrypt the account.
* add "developer mode" preference
* activate WebContentsDebugging also after restart
as the preference option is persisted,
we should call setWebContentsDebuggingEnabled() not only on flag changes.
* capitalize option name, shorter description
* prefer 'can' over 'may'; the latter is very formal
* add Prefs.isDeveloperModeEnabled()
Co-authored-by: B. Petersen <r10s@b44t.com>
this happens only in rare cases as usually the message is always added
and errors happen far later.
but some conditions are checked very soon (webxdc sizes),
and these let an message not even being added.
note, that this pr only shows the error,
it does not change draft handling or so -
it would eg. be better if the message is re-converted to a draft,
however, that would be a larger refactoring and maybe not worth the effort.