Commit Graph

439 Commits

Author SHA1 Message Date
adbenitez 615bef2704 add more padding to the "add member" button 2023-10-30 23:16:18 +01:00
adbenitez 30bca270e1 remove QR button in group creation screen 2023-10-30 19:11:31 +01:00
Hocuri ee966f9006 Merge the verified-1:1 commits into main (#2752)
* Verified 1:1 chats, Android UI (#2560)

Depends on https://github.com/deltachat/deltachat-core-rust/pull/4315/.

Follow-up for https://github.com/deltachat/deltachat-android/pull/2541.

- Show a "verified" icon on protection changed update messages
- Add C API
- Show a dialog over the input bar not only for contact requests, but also when the protection is broken (using the new method `isHalfBlocked()`)
  - The positive button reads "OK" (as opposed to contact requests where it reads "Accept")
- Add SVG icons, remove PNG one
- Translations
- When tapping on the `DC_INFO_PROTECTION_{EN|DIS}ABLED` message, show more information (for now, it leads to the online preview of my FAQ PR)
- Block loading remote images in the "Full Msg View" not only for contact requests, also when the protection is broken (using the new method `isHalfBlocked()`)
- Show a big verified/crossed-out-verified symbol over the `DC_INFO_PROTECTION_{EN|DIS}ABLED` messages
- Fix a bug that was kind of present before (for contact requests) but only became really visible now:
  - Set a draft with an image (or other attachment)
  - Your chat partner breaks verification
  - Expected: Both the input bar and the draft image are hidden by the input-bar-dialog.
  - Bug behavior (before c31de5bcf): The input bar is hidden, but the draft image stays visible.

* change button order of verification-broken alert (#2621)

Having "OK" in the middle of the buttons is weird. The old order was:

```
End-to-end encryption cannot...
[More Info]  [OK] [Scan QR code]
```

1. _If_ the main purpose of the dialog would be to "Scan QR code",
   the text should point that out more, also the opening button.
   Then, the button position would be correct, however,
   it has to read "Cancel" then.

2. _However_, the main purpose of the dialog is to "Show Info",
   "Scan QR code" is only an optional offering and the button a shortcut only.
   And finishing "Show Info" is better done by a simple "OK".
   Then, the "OK" should be rightmost.

This PR implements the second option, the buttons read as follows afterwards:

```
End-to-end encryption cannot...
[More Info]  [Scan QR code] [OK]
```

* fix: load updated display name when chat protection breaks

* Implement feature flag for verified 1:1 chats

* Update res/values/strings.xml

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

* Update src/org/thoughtcrime/securesms/connect/DcHelper.java

* Make another AlertDialog

* Revert "Implement feature flag for verified 1:1 chats"

This reverts commit 2efd17edfcf14e3cf89a6671df38647b552e5661.

* Fix typo

* email server->email provider

---------

Co-authored-by: bjoern <r10s@b44t.com>
Co-authored-by: adbenitez <asieldbenitez@gmail.com>
2023-10-27 17:02:29 +02:00
bjoern 2d01fd9b6f sending reactions (#2680)
* add basic reaction view

* reuse pill background

* make pill border a little more visible; this affects sended reactions as well as received ones

* use 🤣 instead of 😂 to differ more from 😢

also, 😂 is a bit outdated for younger generations
(so is probably 🤣 but not that much)
(alternative would be 💀 for laughing,
but that is probably not compatible between generations)

* use 🙁 instead of 😢 for 'sad' to distict from lol

lol gets revered to 😂 as
🤣 seems to be even a more non-go (thanks for expertise, young folks!)

* wording: we add one reaction, not many

* show/hide add-reaction-view together with action mode

* pass message&view to showAddReactionView()

* add sendReactions() api

* create AddReactionView class

* send reactions on click

* hide AddReactiobView on sending emoji

* detect self-reaction

* feat: remove selections

* position AddReactionView atop of parent view

* move AddReactionView up a bit

* padding top/bottom

* center for now, this also postpones rtl/ltr

* force initial layout

* move slightly more off the bubble, keep away a bit from screen margin

* move AddReactionsView left/right depending on incoming/outgoing mails

* do not allow reactions in read-only chats

* do not allow to react to videochat-invitations and info; the latter may makes sense at some point, however, to lower burder on other implementations, we do not send them for now

* hide reaction-picker when leaving action mode with 'back'

* hide reaction-picker when leaving action mode with 'back'

* scroll reaction-panel together with recyclerview; this does not happen if new messages come in, however, this is a minor (and a stable panel position can be regarded even as a feature)

* add sending reactions as an experimental feature as long not at least all system display reactions

* clarify that reactions are currently not seen by all members

* prefer View.INVISIBLE over offscreen hack
2023-10-20 15:17:24 +02:00
adbenitez 31f96e1f9d registration screen: make checkbox use acent color 2023-10-08 00:07:00 +02:00
adbenitez 4dc1abf135 add comment 2023-10-06 23:26:21 +02:00
adbenitez b24ab37931 allow to properly click in audio messages in multi-select mode
also allow to long-press in play button to select message
2023-10-06 21:21:15 +02:00
adbenitez ce1733f3ea fix displaying of sticker's footer 2023-10-04 03:28:21 +02:00
adbenitez 8300242d0f set some descriptions 2023-10-03 22:11:25 +02:00
adbenitez 27466decf5 remove unnecessary description 2023-10-03 22:07:55 +02:00
adbenitez 1e149eef83 improve screen reader support in conversations 2023-10-03 21:46:36 +02:00
B. Petersen 05850a0d00 move part of left padding from emoji-button to parent; this looks better the emoji button is not needed as using system-emoji are used 2023-09-30 18:12:51 +02:00
adbenitez 9ad19a3c41 display text in reaction pill 2023-09-30 17:32:08 +02:00
adbenitez 79fb395613 set same padding right 2023-09-29 14:37:55 +02:00
adbenitez e6107c4dcf add reactions details dialog 2023-09-29 03:45:35 +02:00
adbenitez a38ad255da basic display of reactions 2023-09-27 20:41:49 +02:00
B. Petersen 3194e94f28 set icon beside 'verified by' 2023-09-26 10:46:37 +02:00
adbenitez 32a70bd8da apply suggestions 2023-09-25 14:39:44 +02:00
adbenitez 9ff3693746 set rounded corner for webxdc icons 2023-09-25 13:08:13 +02:00
Hocuri 0612090397 Adapt Padlock and Location indicator to screen size (#2567)
Fix #2566 - well, mostly: This enlarges the padlock (and the location
indicator if it's present), but not the checkmark(s).

When using the app like this, this feels good as-is.
2023-05-23 10:17:15 +02:00
Hocuri 58aeb0acc9 Bigger scroll-to-bottom button (#2561) 2023-05-10 11:03:22 +02:00
B. Petersen d29f7ad5c9 center footers 2023-03-27 10:29:26 +02:00
B. Petersen b3d21f0be9 move "experimental" hint below qr-code/scanner
the hint in the title was regarded as "not so nice" on first tests
and was even overseen.
2023-03-27 10:29:26 +02:00
B. Petersen a2765597dd add instructions 2023-03-25 16:44:06 +01:00
B. Petersen aa997eafb3 use title bar for qr-scan-activity, providing 'back', a title, and options in the future. the 'white only' should really be used only for the welcome screen 2023-03-25 16:44:06 +01:00
B. Petersen b36cfcabe9 add "Add as Second Device" to welcome view
ppl try already now to set up a second device from the welcome screen.
however, end up in logging into their email account again,
creating issues with keys and more.
a dedicated "Add as Second Devies" button targets this UX issue
by offering a clear path for setting up a second device.

moreover, the string "Scan Invitation Code" is used again (as on all releases),
this string is used quite a bit in different handouts,
changing that would worsen UX as well.

the "Restore from Backup is moved down,
if you really use this path, finding the button is the smallest issue.
the different layout of the button makes clear,
that this is not the preferred way to set up a new account
(but sure, to restore a backup :)
2023-03-25 16:44:06 +01:00
bjoern 3cede346f3 add multi-device-setup (#2493)
* add DcBackupProvider add receiveBackup() wrappers

* add 'Add Another Device' item to settings

* add android-ifaddrs

core-rust uses getifaddrs() which is not available on android ndk.
pull in the code from https://github.com/morristech/android-ifaddrs
that provides an implementation.

* add BackupProviderActivity

* make SVG-hack reusable

* add BackupProviderFragment

* prepare scanning backup codes

* Revert "add android-ifaddrs"

This reverts commit 33b1424427620396f282805d37f8e05c67758546.

* more logging

* call receiveBackup() on scanning DC_QR_BACKUP

* Fixup for recvmmsg fallback

* protect BackupProviderActivity by system secret

* show transfer progress as provided form the core; hide qr-code once scanned

* add a permanent notification for the provider

* clarify what we are waiting for

* add a permanent notification for the receiver

* ask before finishing BackupProviderActivity

* it is fine to cancel the abort question by tapping outside the alert

* remove outdated comment from 'keep screen on'

* add and check TRANSFER_MODE

* rename BackupProviderActivity to BackupTransferActivity

* use our base activity

* start/stop IO in base activity

* use BackupTransferActivity also for scanning

* add BackupReceiverFragment

* show detailed transfer progress

* show details instead of percent during preparation, for now

* launch chatlist and remove welcome when transfer is done

* redirect to chatlist automatically after transfer succeeded

* reword

* make log accessible from send and receive activities

* bump version

* show error if backup provider creation fails

* remove unneeded format()

* show some context in the errors alerts, hide QR code sooner

* calculate transfer percentage as specified

* show a 'close' instead of a 'back' button to make visually clear, things are aborted (there is a quesion anyway)

* add option to copy backup-qr-code to clipboard

* remove vague retry statement, core will show a detailed error soon

* warn about QR codes on clipboard getting invalidated

* make basic strings translatable

* add troubleshooting menu item (once help is evolved, it may be a more visible button, may be localized, may be offline)

* rename to backup_transfer_fragment.xml

* add detailed instructions

* move 1,2,3 layout to the .xml

* fix layout

* use text size used elsewhere

* do best effort to show SSID on sending device

* make SSID code reusable for receiver

* adapt to otherwise used font style

* show ssid also for receiver

* minor refactorings

* make qr code subtitle translatable

* tune down 'same network hint' on scanning device

* add progress bar to provider

* add progress bar to receiver

* bump version

* use 'Add Second Device' wording

this seems slightly catchier as "Add Another Device"
and has less "A" esp. in "Add as Another Device" :)

also at least translation to german seems nicer ("Zweitgerät"),
most ppl will use max. two devices, but even if more,
that should still be fine.

this was also the first intuition also by other devs in their mockups,
so we'll give it a try.

* use "Exporting/Preparing/Prepared Account" wording

let's give that a try - "Account" is also widely used,
so that seems to make some sense.
even if not 100% fitting,
it seems better than introducing the new term "Collection".

* refine abort question

* Update res/layout/backup_provider_fragment.xml

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

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

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

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

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

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

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

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

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

* remove string duplicate

* refine 1,2,3

* simplify string ids

* focus on what matters

---------

Co-authored-by: link2xt <link2xt@testrun.org>
Co-authored-by: Hocuri <hocuri@gmx.de>
2023-03-24 15:22:26 +01:00
Asiel Díaz Benítez 1523e7bc07 add app icon to webxdc info messages (#2503)
* add app icon to webxdc info messages

* Update res/layout/conversation_item_update.xml

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

* check if info message type is DcMsg.DC_INFO_WEBXDC_INFO_MESSAGE before loading parent message

---------

Co-authored-by: Hocuri <hocuri@gmx.de>
2023-03-22 15:44:56 +01:00
adbenitez b116da053c set background image for QrShowFragment 2023-03-14 11:29:57 -04:00
adbenitez 6993317be3 fix "use SOCKS5" switch style (not visible in dark mode due to forced Light theme) 2023-01-19 00:15:03 -05:00
adbenitez 4aaa656938 make SOCKS5 section more similar to Delta Chat Desktop 2023-01-18 15:11:48 -05:00
adbenitez 3dfc587183 add socks5 settings to registration activity 2023-01-18 01:06:48 -05: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
adbenitez 421d2cf978 use Start/End instead of Left/Right in avatar layout 2022-10-17 16:55:32 -04: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 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
adbenitez b66117de99 add "seen recently" indicator 2022-08-25 00:02:30 -04:00
Hocuri 0e7bc9b8b7 More videochat footer padding (#2340) 2022-07-10 10:39:07 +02:00
B. Petersen 1cb7d93417 show more info messages by adapting spacing to the overall layout
the spacing was just a bit too much,
eg. bubble spacing is 6dp atop and abottom.

this was always not-so-good, however, as info-messages are
more in use by webxdc now, it gets more visible.

the new spacing roughly matches the layout on ios.
2022-06-06 12:16:20 +02:00
B. Petersen a334fa5495 redesign secondary button, for light and dark mode 2022-05-01 12:26:44 +02:00
B. Petersen 4c449535dc bigger logo on small screens, while staying nice on big screens 2022-05-01 12:26:44 +02:00
B. Petersen 158d782e26 update startup image, layout 2022-05-01 12:26:44 +02:00
B. Petersen 2f56a2762f reorder and restyle buttons 2022-05-01 12:26:44 +02:00
B. Petersen 9277ac0623 adapt strings to new welcome screen 2022-04-26 21:14:48 +02:00
Asiel Díaz Benítez 5133f83477 Update res/layout/webxdc_compact_view.xml
Co-authored-by: Hocuri <hocuri@gmx.de>
2022-04-11 14:11:00 -04:00
adbenitez edd7727101 improve Docs tab, improve display of webxdc items, allow to open them directly 2022-04-11 03:38:33 -04:00
adbenitez 332bd00024 use the same size for the action bar's title in the chat list and conversation's title 2022-03-28 11:38:51 -04:00
bjoern 5343da7248 larger webxdc icon, title and summary full-width below (#2203) 2022-01-26 22:58:56 +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
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