Commit Graph

2098 Commits

Author SHA1 Message Date
bjoern 563c0296fa Combined webxdc patches (#2465)
* re-applying patch from @Hocuri from #2458

* apply sandbox isolation patch from @WofWca

* wait for gc as suggested by @WofWca, @Simon-Laux and others

* Update res/raw/sandboxed_iframe_rtcpeerconnection_check.html

Co-authored-by: WofWca <wofwca@protonmail.com>

* Update res/raw/sandboxed_iframe_rtcpeerconnection_check.html

Co-authored-by: WofWca <wofwca@protonmail.com>

* improve progress bar, inspired by @Simon-Laux and @WofWca

* comment about the gist of setNetworkAvailable()

* unify url-loading; this cleans up things and makes adding CSP more straight-forward

---------

Co-authored-by: WofWca <wofwca@protonmail.com>
2023-02-05 14:45:45 +01:00
B. Petersen 4ba6daae21 Revert "Webxdc fixes"
This reverts commit 6afddd84fff659fa6d8f727f2bf388d0c504058d.
2023-02-03 13:18:05 +01:00
Hocuri 8281bf9489 Webxdc fixes (#2458)
This now fixes all the checks in the `test webxdc`, see the
Delta Chat group
2023-01-31 18:30:53 +01:00
adbenitez cc97b61299 don't allow to reveal proxy password when editing the settings after account was successfully configured 2023-01-18 17:10:07 -05:00
adbenitez 3dfc587183 add socks5 settings to registration activity 2023-01-18 01:06:48 -05:00
bjoern 90c4399d2a prepare 1.34.10 (#2447)
* update CHANGELOG for 1.34.9

* bump version to 1.34.9

* add a little device message for the 1.34.9 update

* add f-droid changelog

* make device message more clear and add it only for existing installations

* bump to 1.34.10
2023-01-11 10:54:02 +01:00
bjoern a7e624f4a7 fade left/right animation when opening the archive (#2446)
this is similar to opening a chat and feels more natural.
settings/connectivity/help etc. still appear from the bottom as being
"something little different".
2023-01-08 23:26:16 +01:00
bjoern 17039651be add function 'mark all as read' to archive (#2443)
* add function 'mark all as read' to archive

as we have the unread counter there now,
we should have an easy way to reset it.

* more clear strings-key
2023-01-06 11:37:33 +01:00
link2xt 543a7965c2 Remove ndk-make.sh symlink to scripts/ndk-make.sh
If scripts are always called directly without symlink,
there is no need to use `realpath` which is not available
on some systems.

F-Droid builds already use scripts/ndk-make.sh:
<https://gitlab.com/fdroid/fdroiddata/blob/master/metadata/com.b44t.messenger.yml>

Same for nightly builds running on Concourse CI.
2023-01-05 18:38:20 +00:00
bjoern fc542dbe7e tweak archive (#2441)
* basic layout of new archive-link, including icon and unread counter

* remove 'archived chats' from main menu

* vertically align elements of new archive-link

* show unread indicator also for archived chats

* show muted unread counter in grey

* use shorter label for the 'Archive' link
2023-01-05 10:37:52 +01:00
Hocuri d1b3124ab0 Don't animate the spinning circle if animations are disabled (#2338) 2022-11-24 12:34:57 +01:00
bjoern 0169db7146 add versionCode to debug info (#2427) 2022-11-15 17:30:18 +01:00
bjoern 81c2812390 let DynamicLanguage.getLayoutDirection() work on sdk16/android4.1 (#2423)
sdk16/android4.1 does not support RTL fully,
therefore just return LTR in this case
(this is also what `ViewCompat.getLayoutDirection()`
and `View.getLayoutDirection()` are doing).

always using `ViewCompat.getLayoutDirection()`, however,
causes problems as the layout is based on the content then
(see #2422)

closes #2420
2022-11-12 22:33:48 +01:00
bjoern 2450bfc4bf remove meanwhile superfluous data2IsString() (#2418) 2022-11-10 10:39:33 +01:00
bjoern d6f9b5e283 avoid crashes when adding notifications (#2419)
notificationManager.notify() sometime crashes,
it seems to be on some OS versions
in combination with missing sounds (maybe deleted system sounds, idk).

i could not reproduce the issue,
however, by the stack traces reported in the gplay backend,
adding a try/catch block should help.

there is also a similar issue reported on stackoverflow ,
https://stackoverflow.com/questions/72491592/notificationmanager-notify-throwing-securityexception-only-on-android-11-and-1

in the issue, ppl try to fall back to some default parameters in the exception block,
however, as it is a bit unclear what really the issue is,
one only risks further crashes; also, the crashes are still quite rare,
sth. seems to be wrong in the OS here,
so we should not try to be too smart here.
2022-11-10 10:39:19 +01:00
Asiel Díaz Benítez 856b2d3cdf fix message bubble corner for RTL languages (#2410) 2022-10-30 16:18:19 +01:00
bjoern 443ea0cd36 bump targetSdkVersion to 32 (#2407)
* bump targetSdkVersion to 32

* explicitly set `android:exported` for `indent-filter`

this is required since targetSdkVersion 31,
https://developer.android.com/guide/components/intents-filters#Receiving

as the default was `false` before,
i just explicitly set `android:exported="false"` without looking in the details
of each filter.

* update to gradle 7.2.2; this might be needed to get warnings etc.

* update androidx dependencies

at least the update of androidx.sharetarget is required because of the missing
`android:exported`; i took the chance to update all androidx depenencies.

see https://developer.android.com/jetpack/androidx/releases/appcompat
for a CHANGELOG of each dependency.

* use explicit dependency instead of transitive ones; this fixes a weird duplicate error, see https://stackoverflow.com/questions/69817925/problem-duplicate-class-androidx-lifecycle-viewmodel-found-in-modules

* work around google's poor design decision wrt FLAG_MUTABLE

instead of setting a default behavior and logging a warning,
google crashes the application when the flag is missing on newer androids.

and setting the flag for older API seems to be undefined and therefore a lot of
Build.VERSION.SDK_INT >= Build.VERSION_CODES.M would be required each time
a PendingIntent object is constructed ...

our Util returns either the new flag or zero,
so that can just be used unconditionally on construction.

* update dependencies but exoplayer to mitigate issues with FLAG_MUTABLE

exoplayer needs more love and updating opens a can of worms;
i tested, at least in the emulator, video and voice message playback
works as usual, so let's update exoplayer if needed.
2022-10-30 16:06:24 +01:00
bjoern f9286975d6 use more modern methods to track connectivity changes (#2403)
* use registerDefaultNetworkCallback() instead of deprecated CONNECTIVITY_ACTION

CONNECTIVITY_ACTION is deprecated, see https://developer.android.com/reference/android/net/ConnectivityManager#CONNECTIVITY_ACTION,

instead, we call maybe_network() at ConnectivityManager.NetworkCallback::onAvailable() callback.

* add more debug info
2022-10-29 15:42:44 +02:00
Hocuri c95bfb544d Also show errors for incoming emails (#2404)
Needed for deltachat/deltachat-core-rust#3583. Before that PR, we never put errors on incoming messages, so this wasn't necessary.
2022-10-28 12:18:00 +02:00
Asiel Díaz Benítez f85cb990db hide ephemeral timer in mailing lists (#2394) 2022-10-04 10:13:04 +02:00
bjoern a9c8b30c3e prepare 1.34.0 (#2392)
* bump version to 1.34.0

* update changelog for 1.34

* add core changes to CHANGELOG (core91..core95)

* add 1.34 device message

* tweak device message

* update translations
2022-10-01 23:01:26 +02:00
Simon Laux 05fcac819e add dclogin scheme to qr code scan (#2366)
* add dclogin scheme to qr code scan

* Update src/org/thoughtcrime/securesms/qr/QrCodeHandler.java

Co-authored-by: Asiel Díaz Benítez <asieldbenitez@gmail.com>

* Update src/org/thoughtcrime/securesms/qr/QrCodeHandler.java

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

* handle DCACCOUNT and DCLOGIN schemes on new intents

* keep existing function name, that is maybe not less confusing, but at least already known

Co-authored-by: bjoern <r10s@b44t.com>
Co-authored-by: Asiel Díaz Benítez <asieldbenitez@gmail.com>
2022-09-29 18:34:01 +02:00
bjoern e13bb9488a add 'Audio' tab to profile (#2387) 2022-09-21 22:49:49 +02:00
bjoern 1fd0cad721 separate tab for private apps (#2386)
* move webxdc private apps to separate tab

* switch to scrollable tab layout; fixed layout may look not-so-nice with more tabs and longer descriptions that get a tiny font then
2022-09-21 22:18:48 +02:00
bjoern b50ea95f4d remove initiateKeyTransfer()'s wait dialog; the function is no longer blocking (#2385) 2022-09-19 10:10:33 +02:00
bjoern 3a7227b77b reword "Webxdc content" (#2377)
* reword "Webxdc [content]" to "Webxdc Apps"

adding "App" to the term makes things much clearer to the user,
was "Webxdc" is about.

eg. on iOS, we have an app selector meanwhile,
calling that _just_ "Webxdc" in the menu or in the title makes it pretty
unclear to the user what this is about.
same for the tab "Webxdc" on desktop or the default description in the summary.
otoh, calling it _only_ "Apps" (as now), may also raise false expectations
and may be mixed with "normal" apps.

so, "Webxdc App" seems to be a good approach.

there is also the term "Mini App" [^1], we could also go for that,
but this is a broader discussion as this would give up the term "Webxdc" partly.

in any case, if there is few space in the UI,
it seems to be okay to abbreviate with just "App" or "Apps" as needed,
if it is otherwise clear that the thing is a "Webxdc App" or "Mini App".

[^1]: the term "Mini App" is aleady known for similar types of apps
(some "small app" running in a "super app")
cmp. https://www.w3.org/TR/mini-app-white-paper/#what-is-miniapp .
of course, our "Webxdc Apps" are not compatible with other "Mini Apps"
however, this is also not the case between "Mini Apps" of other vendors
which also have different focuses.
so "Mini App" seems to be a broader term and does not imply compatibiliy.

* use term 'Private Apps' for webxdc content

* add some translator hints
2022-09-19 10:01:43 +02:00
Asiel Díaz Benítez 1252b862d8 load contact from database before calling wasSeenRecently() (#2382)
* load contact from database before calling wasSeenRecently() in ConversationActivity.handleEvent()

* add a comment about why handling DC_EVENT_MSG_DELIVERED is needed
2022-09-16 09:54:01 +02:00
adbenitez a631ef9da1 hide "leave group" option from menu for mailing list chats 2022-09-14 22:21:56 -04:00
bjoern 13c32b6552 rework system messages (#2380)
* do not set deprecated stock-translations

* mark now unused stock translations as deprecated

* add new system messages to english strings.xml

* add translator comments to new strings

* set new system messages
2022-09-11 21:03:54 +02:00
bjoern 33a543328f Revert "create adaptive shortcuts" (#2379)
* Revert "create adaptive shortcuts"

This reverts commit 35dd8c905b.

The cut out is not the largets possible circle inside the square icon
(as for group images or avatars, diameter==height)
but a much smaller circle (diameter==~0.6*height),
resulting in too many information being left out.

Therefore, it is better to leave icon layout to the OS.

(to get an idea about the amount of cut out, see a circular logo,
eg. the hextris one)

* add comment why not to use createWithAdaptiveBitmap()
2022-09-08 17:46:34 +02:00
bjoern e39842c692 restricted webxdc internet access (#2378)
* allow webxdc internet access if the corresponding flag is set by core

* do not intercept requests when internetAccess is granted
2022-09-06 11:22:08 +02:00
bjoern 8a98da3c78 replace deprecated DcAccountsEventEmitter by DcEventEmitter (#2376) 2022-08-29 18:05:34 +02:00
bjoern 3121cd9ade simplify contact list (#2374)
* simplify contact list

this also disables "fast scrolling" for the contact list;
the "fast scrolling" code is too much bound to the bubbles and a-z
to be preserved without much effort.

however, "fast scrolling" seems to be much less important
with a list sorted by "last seen".
there is also the rough idea to raise minimal-origin of contact list,
this would make the list much smaller
(<https://github.com/deltachat/deltachat-core-rust/pull/2411>),
otoh, not sure if #2411 is a thing for list sorted by "last seen".

also the other lists (chatlist, archive, blocked) may become quite huge as well
and do never have "fast scrolling".

in case it is really needed again,
however, we should go for the implementation available in RecyclerView since some time:
<https://stackoverflow.com/questions/45370246/how-to-use-fastscrollenabled-in-recyclerview>

* less padding as the A-Z decorations do not longer need space

* remove unused contact_selection_recyclerview_header
2022-08-29 13:56:06 +02:00
bjoern 4b3382dab5 use dc_contact_was_seen_recently() (#2373)
* add DcContact.wasSeenRecently()

* use DcContact.wasSeenRecently() and remove isSeenRecently()

* remove now again unused imports
2022-08-26 23:13:56 +02:00
adbenitez f4e693ca63 improve performance 2022-08-25 16:11:55 -04:00
adbenitez b66117de99 add "seen recently" indicator 2022-08-25 00:02:30 -04:00
adbenitez 35dd8c905b create adaptive shortcuts 2022-08-20 18:57:11 -04:00
bjoern 853000f8dc option to add webxdc apps to home screen (#2353)
* add 'Add to Home Screen' menus for webxdc apps

* make adding shortcut basically work

* avoid starting webxdc from foreign accounts

* recreate back stack, if possible

according to
https://developer.android.com/training/notify-user/navigation :
"When you start an activity from a notification,
you must preserve the user's expected navigation experience.
Tapping Back should take the user
back through the app's normal work flow to the Home screen [...]"

same seems to be true for shortcuts using the same class for constructing
the back stack.

the back stack is reconstructed for API 26 (Oreo, 2017) or newer,
for oder API `requestPinShortcut()`
only uses the top-level activity for the shortcut.
working around that is probably possible, but would be quite some effort in an
already complicated area and would result in bugs that are not so easy to see.

also, on these old androids, users are probably used to the no-back-stack
behaviour.

* show a warning if app was deleted

* add 'Add to Home Screen' also to gallery

beside chat- and webxdc-activity,
this is the third place where the webxdc is listed.

as adding may result in dialogs from the launcher,
we allow the option only for a single selected webxdc,
as otherwise a series of dialogs would pop up.

* show 'Done' toast short, this is what we are doing at all the other places when showing 'Done'
2022-08-15 11:30:14 +02:00
adbenitez 2172ca587e hide resend menu option if messages are not outgoing 2022-08-10 03:38:13 -04:00
B. Petersen 5bb010de5d reorder code for smaller diff 2022-07-26 22:45:29 +02:00
B. Petersen ebcf3914bd show post-addr in mailing list profile's subtitle; for saved messages/device chat, show subtitle as in chat view 2022-07-26 22:45:29 +02:00
B. Petersen 1c41b7705d more precise scope of the title usage 2022-07-26 22:45:29 +02:00
B. Petersen 57a32f3fb1 show ephemeral icon for both, contact and group profiles (before it was hidden in group profile, for whatever reason) 2022-07-26 22:45:29 +02:00
B. Petersen 9740607147 add DcChat::getMailinglistAddr 2022-07-26 22:45:29 +02:00
adbenitez 6f57eff172 update to new maplibre API 2022-07-22 23:48:42 +02:00
Hocuri 776f730e7c We won't blog post about this yet 2022-07-17 00:05:29 +02:00
Hocuri 05c52e622f hpk's wording suggestion, correct blog post link 2022-07-17 00:05:29 +02:00
Hocuri 3f9cab2f55 Add AEAP link in the UI instead of core 2022-07-17 00:05:29 +02:00
Hocuri 045ba76390 Add AEAP info dialog & strings 2022-07-17 00:05:29 +02:00
B. Petersen b661c77b47 rename "Docs" tab to "Files"
- "Files" is broader than "Docs"
  (documents are just one type of files,
  files can also be executables and whatnot)
- at other places in the app, we also speak of "Files"
  ("sending files" etc.)
- Delta Chat iOS also uses the term "Files"
2022-07-16 22:51:04 +02:00