Commit Graph

2031 Commits

Author SHA1 Message Date
adbenitez e24a72de61 set baseURL 2022-05-03 07:21:49 -04:00
adbenitez 144a2df3c9 remove comment 2022-05-03 06:54:52 -04:00
Asiel Díaz Benítez 35a535705b Update src/org/thoughtcrime/securesms/WebxdcActivity.java
Co-authored-by: bjoern <r10s@b44t.com>
2022-05-03 06:53:16 -04:00
adbenitez 47190896d2 webxdc: allow internal pages and open some known schemes externally 2022-05-03 06:36:23 -04:00
B. Petersen e91f46ed5d draft device message 2022-05-02 21:06:22 +02:00
B. Petersen 6b8f0842aa use new dc_provider_new_from_email_with_dns() api 2022-04-27 23:04:18 +02:00
B. Petersen ad042a73ab add "Resend" to message menu
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.
2022-04-26 21:00:47 +02:00
B. Petersen f047f1382e add resendMsgs() api 2022-04-26 21:00:47 +02:00
B. Petersen bc40b4898f update core stock strings 2022-04-17 16:08:07 +02:00
B. Petersen 04b32db81f show download failure
tapping on the message, still allows re-downloading
in case of temporary errors.
2022-04-14 22:24:21 +02:00
Hocuri a4efe7f47f Warn when enabling config "only_fetch_mvbox" 2022-04-12 19:10:16 +02:00
Asiel Díaz Benítez 068f3446cd Merge pull request #2273 from deltachat/adb/improve-docs-tab
improve display of webxdc items in Docs tab
2022-04-11 14:13:33 -04:00
Hocuri 4b96d8a98e Update search results when the chatlist changes (#2271)
Fix #1843
2022-04-11 10:15:20 +02:00
adbenitez edd7727101 improve Docs tab, improve display of webxdc items, allow to open them directly 2022-04-11 03:38:33 -04:00
Hocuri 7d13b71b0b Very small speed improvements (#2269)
* 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.
2022-04-10 10:02:10 +02:00
Asiel Díaz Benítez 12e4259194 Merge pull request #2266 from deltachat/adb/tweak-confirm-forward-dialog
tweak confirm-to-forward dialog
2022-04-10 00:36:59 -04:00
Asiel Díaz Benítez e8f20afda0 Merge pull request #2265 from deltachat/adb/issue-1753
fix sound notifications, allow to set to "silent"
2022-04-09 23:22:00 -04:00
Asiel Díaz Benítez c8af3ea4d3 Merge pull request #2267 from deltachat/adb/add-quoted-webxdc-thumbnail
show webxdc icon in quotes
2022-04-09 23:17:42 -04:00
adbenitez 8566a67068 show webxdc icon in quotes 2022-04-07 03:18:48 -04:00
adbenitez 31f55a315c go back to chatlist when back button is pressed or user touches outside the dialog in the dialog asking to confirm to forward message inside chat 2022-04-07 00:35:58 -04:00
adbenitez b98dd7bd36 set channel sound to silent when needed 2022-04-06 17:05:40 -04:00
adbenitez 5acb84328d set correct value for silent sound in default notification settings 2022-04-06 16:58:49 -04:00
adbenitez d4db45f581 pause/destroy webview when activity is paused/destroyed 2022-04-04 15:42:57 -04:00
adbenitez c9fd88fec7 when clicking a system message, jump to parent message if the parent is a webxdc 2022-04-03 14:34:03 +02:00
adbenitez 675ef73c98 avoid null mime type 2022-04-02 00:57:32 -04:00
Asiel Díaz Benítez cca6fd2c75 Merge pull request #2249 from deltachat/adb/issue-1835
avoid rotated avatar image when selecting new self-avatar from Gallery
2022-04-01 15:00:51 -04:00
Hocuri 5e5932619c Remove unused getChatMsgs() (#2252) 2022-03-29 21:23:40 +02:00
adbenitez 2962796afb avoid rotated avatar image when selecting new self-avatar from Gallery 2022-03-27 11:13:34 -04:00
Hocuri de9100f8e1 fix stuff 2022-03-26 13:01:26 +01:00
Asiel Díaz Benítez 764023f227 Merge pull request #2245 from deltachat/adb-issue-2195
Do not disable fullscreen keyboard
2022-03-23 19:14:27 -04:00
adbenitez f5b6e774cb do not disable fullscreen keyboard 2022-03-23 18:07:20 -04:00
Asiel Díaz Benítez e1379e41aa add account id to webxdc-fake-url (#2243) 2022-03-23 11:16:38 +01:00
link2xt 4a338de5bc Mark already seen messages as seen
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.
2022-03-19 17:23:52 +00:00
bjoern eb2c06cd25 enable Window.sessionStorage, Window.localStorage and IndexedDB APIs (#2221)
* 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.
2022-03-04 20:37:43 +01:00
bjoern adf02b50e5 adapt js to new webxdc-update-api (#2223)
* adapt js to new webxdc-update-api

* the stub implementation of getAllUpdates() must still return a Promise

* reword parameters of getStatusUpdates()
2022-03-04 20:23:56 +01:00
bjoern 6381328c43 prepare 1.28.0 (#2216)
* update changelog for 1.28.0

* bump version to 1.28.0

* add 1.28 device message

* streamlined device message

* fix typo

* simplify wording wrt mailing lists

Co-authored-by: holger krekel <holger@merlinux.eu>
2022-02-01 14:53:51 +01:00
Hocuri 0bc9f4735c Add OnlyFetchMvbox option (#2206)
* [WIP] Add OnlyFetchMvbox option

* Update res/values/strings.xml

* Adapt to the core changes

* Update res/values/strings.xml

Co-authored-by: bjoern <r10s@b44t.com>

* Remove unnecessary startIo() addition

* Update res/values/strings.xml

Co-authored-by: bjoern <r10s@b44t.com>

Co-authored-by: bjoern <r10s@b44t.com>
2022-01-31 17:47:52 +01:00
B. Petersen 4607af4459 hack: remove quotes from qr-code group join string 2022-01-31 16:27:07 +01:00
B. Petersen 645864217f update summaries for webxdc drafts, so one can see what one is sending 2022-01-30 11:48:45 +01:00
B. Petersen d6dd07fd7a tweak default summaries
- 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.
2022-01-30 11:48:45 +01:00
adbenitez 98e6e73717 don't force dark mode in webpage for WebxdcActivity and FullMsgActivity webviews 2022-01-28 22:10:02 +01:00
bjoern ee47563f3d avoid caching resources between webxdc apps (#2205) 2022-01-27 12:07:34 +01:00
bjoern c205a1692e webxdc: warn when the app tries sendUpdate() and the user cannot send (#2199)
* show a warning when trying to sendUpdate() for contact requests or other chats the user cannot send to

* add missing 'Start...' translation
2022-01-22 22:11:29 +01:00
Hocuri 11ec547386 Make it possible to create an encrypted database (#2186)
- 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.
2022-01-22 20:57:16 +01:00
Asiel Díaz Benítez eb25a5e78c add "developer mode" preference (#2196)
* 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>
2022-01-22 11:01:48 +01:00
bjoern a9a99047da move up when tapping webxdc info messages (#2194)
* add DcMsg.getParent() api

* factor out scrollSmoothToMsgId() and use that for both, quotes and webxdc-info-messages
2022-01-20 00:53:50 +01:00
bjoern b102026158 show errors when sending fails (#2193)
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.
2022-01-18 17:18:07 +01:00
bjoern 9e70aa7cad webxdc (#2174)
* add new w30 APIs

* create the webview,
disable internet access,
inject deltachat.js

* connect deltachat to the webview

* promisify api

* use msgActionButton to start the w30 apps

* cleanup

- create observers in onCreate() to avoid memory leak,
- derive from WebViewActivity to easier deal with particularities
  and to saves >100 loc
- reorder some methods to reflect lifetimes

* make it more clear, which uri-part is 'domain' and which one is 'path'

* unify logging

* it is 'statusUpdate' not 'stateUpdate'; not sure if promise is needed at the end, we can readd that as needed, simple code for now

* use core implementation for status updates

* disable debugging enabled by default, streamline code

* use same name for InternalJSApi for both, js and java

* getStatusUpdates() always return an array

* call JSON.stringify() on payload

* fix typo, fix equal operator

* use shorter function names in js land

* adapt to new zipped w30 format

* load any file from w30 archives

* add fallback if getMimeTypeFromExtension() fails

* rename w30 to webxdc

* add selfName()

* return selfAddr() if selfName() is empty

* rename deltachat.js to webxdc.js

* observer correct event

* rename getBlobFromArchive() to getWebxdcBlob()

* show webxdc app name in title bar

* swap payload and descr in sendUpdate() (adapt to new core api)

* allow user-defined-texts for webxdc apps, make room for icon+name

* show webxdc icon and name in chats

* render webxdc drafts accordingly

* allow configuring drafts

* do not destroy webxdc-message to be sent out by removing it via setDraft(null)

* fix crash when replying to webxdc messages

* add webxdc messages to profile's document tab

* hide 'search menu' for webxdc apps

* show app summary beside app icon

* remove outdated comment

* add precautious WebView restrictions

* Update src/org/thoughtcrime/securesms/ConversationItem.java

Co-authored-by: Asiel Díaz Benítez <adbenitez@nauta.cu>

* Update src/org/thoughtcrime/securesms/ConversationItem.java

Co-authored-by: Asiel Díaz Benítez <adbenitez@nauta.cu>

* Update src/org/thoughtcrime/securesms/ConversationActivity.java

Co-authored-by: Hocuri <hocuri@gmx.de>

* Webxdc requires at least Android 5 Lollipop

see https://github.com/deltachat/deltachat-android/pull/2174#discussion_r785436874

* recognize .xdc files on android10

based on @Hocuri's findings in #2188

Co-authored-by: Simon Laux <mobile.info@simonlaux.de>
Co-authored-by: adbenitez <asieldbenitez@gmail.com>
Co-authored-by: Asiel Díaz Benítez <adbenitez@nauta.cu>
Co-authored-by: Hocuri <hocuri@gmx.de>
2022-01-18 10:52:09 +01:00
Asiel Díaz Benítez 003ca291ac remove inbox_watch and mvbox_watch options from advanced settings (#2182)
* remove inbox_watch and mvbox_watch options from advanced settings

* don't show warning dialog when SENTBOX_WATCH is disabled
2022-01-09 17:49:39 +01:00
Asiel Díaz Benítez 45bb431bad don't allow to add POI if user can't send in current chat, e.g. is not a member anymore (#2178) 2021-12-27 15:05:54 +01:00