Commit Graph

106 Commits

Author SHA1 Message Date
bjoern 85321f3e87 reword 'Copy to Clipboard' to 'Copy Text' (#2570)
message list allows multiple messages
being copied to clipboard at the same time;
if these messages as not just text, a summary is added,
sth. as "Voice Messages" or "Forwarded: Image - this is my family" etc.

this is on purpose and the gist of the action,
renaming the action to 'Copy Text' makes that more clear.
2023-05-28 21:17:33 +02:00
bjoern e50a13f371 streamline map wording (#2562)
* streamline menu

- remove prefix 'Show', we are not using it at most other places,
  nor do comparable UI

- move 'All Locations' below 'All Media',
  this seems to be more logical
  (we were even thinking of making 'Locations' a tap in 'Media')

* add missing plural form for 'Location' (needed for iOS map experiments, maybe also the better title for the in-chat-maps in general)
2023-05-15 12:40:44 +02: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
B. Petersen 8956838641 clarify 'Clear Chat', remove string prefix (we add new prefixes or postfixes only if the raw one is not free) 2023-03-14 11:31:26 +01:00
Asiel Díaz Benítez b4682b9d79 Merge pull request #2497 from deltachat/adb/tweak-menus
tweak main menu and settings
2023-03-13 20:27:03 -04:00
Asiel Díaz Benítez 920889c119 Merge pull request #2175 from deltachat/adb-clear-chat
allow to remove all messages from current chat
2023-03-13 20:18:44 -04:00
adbenitez 75f3a7c0df tweak main menu and settings 2023-03-13 19:45:09 -04:00
adbenitez ffb788e4b6 add "clear chat" 2023-03-13 19:08:06 -04:00
adbenitez 4f457a5e62 add "All Media" option to global menu 2023-03-13 14:54:19 -04: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
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
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
B. Petersen 3aa30899a5 add 'Source Code' item to webxdc menu
the code is a tiny bit more complicated
as we keep the call to get_webxdc_info() in background
and also avoid a second call to get_webxdc_info().
2022-05-18 22:58:20 +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
Asiel Díaz Benítez be56cb380e QR activities improvements (#2103)
* allow to copy QR data and to read QR data from clipboard

* add share option

* allow to scan QR from gallery

* use menu_copy_to_clipboard instead of menu_copy_link_to_clipboard

* use AttachmentManager

* reuse Bitmap

* change REQUEST_CODE_IMAGE value

* use getCacheDir()

* replace handleOpenPgp4Fpr with handleQrData

* show error message if scanning QR failed

* use Log.e() instead of Log.w()

* Revert "use getCacheDir()"

This reverts commit 2a2a801b311e7c4929f5063d3340234413528b93.

the impact of this change is eaasily larger than expected,
see comments at https://github.com/deltachat/deltachat-android/pull/2103

if needed, we can discuss and re-add that in a separate, more focused pr.

Co-authored-by: B. Petersen <r10s@b44t.com>
2021-11-04 12:26:32 +01:00
bjoern ab5c57736a re-add "Add Attachment" menu entry (#2094)
it was removed to have some less menu entries,
however, on recent discussions,
it turns out clearer and clearte that this will break some workflows
(writing text first, then adding attachment).

i just had a look at other "large" messengers -
all of them support "write text, then add attachment" -
as well as our iOS and Desktop apps.
also, this order seems to be pretty normal when it comes to "E-Mail".

all in all,
i think, we should not sacrify this workflow just to save one menu entry.

at some point,
maybe we want to have the "Attach" button always visible left of the input bar
as most other messengers do (as well as iOS and Desktop),
however, this is a larger thing and also has its drawbacks on smaller screens.

so, just leave things as is seems not to be the worse idea here.

the "View Profile" menu entry, however stays, removed,
so, there is some cleanup.
2021-10-27 10:42:53 +02:00
Hocuri 1fcda9c2d2 Remove "View Profile" and "Add Attachment" from menu (#2079)
The menu has grown waaaaay to big, before it has been up to 8 entries,
now it's two entries less.
2021-10-13 22:31:38 +02:00
bjoern e71f5d9bba broadcasts android ui (#2060)
* add broadcasts ffi

* add 'broadcast' options to menu, chat, profile etc.

* generate initial broadcast names

* reword broadcast hint

* make 'Broadcasts Lists' experimental; while on that, also add a confirmation dialog to the location streaming switch (wording taken from ios)

* Update res/values/strings.xml

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

* comment on strings.xml

* tweak 'experimental' appearing, avoid the 'test tube'-emoji that is not supported on many devices

Co-authored-by: Hocuri <hocuri@gmx.de>
2021-09-30 15:44:17 +02:00
Asiel Díaz Benítez c4f7a72493 allow to export all selected attachments (#2048)
* allow to export more than one attachment

* tweak strings
2021-09-06 23:31:52 +02:00
bjoern 2e9f7e58f2 tweak 'Archived Chats' and 'Requests' (#1991)
* add 'Archived Chats' menu entry

the menu entry is at the place where the 'Contact Requests' were before -
that way, ppl may find existing contact requests easier.

moreover, it is now possible to access 'Archived Chats'
without endless scrolling ;)

* for archived requests, show both tags

* show a hint when 'Archived Chats' is empty

* contact requests do not display unread count; do not retrieve it and do not show text in bold
2021-07-29 10:18:51 +02:00
Hocuri f941fd3c53 Remove Deaddrop chat (Android UI) (#1975)
See deltachat/deltachat-core-rust#2514

Fixes #1963
Fixes #1890

Before deleting a chat the user is asked for confirmation. Before blocking not, because blocking is not "destructive" (i.e. can be completely reverted by unblocking the contact). I'm wondering whether we should show a snackbar with an Undo button though, but we can probably wait for user feedback on this.

* Start removing deaddrop chat

* Generally works

* Fix the buttons

(it's not easy to not show one of the buttons in
ConstraintLayout; if problems turn up, we should probably
just not use ConstraintLayout)

* fix more things

* restartLoader() instead of notifyDataSetChanged() because the latter didn't do anything

* Archived badge

* Rename "Contact request" to "Request"

* oops

* Remove setStockTranslation(8, context.getString(R.string.chat_contact_request));

* Remove commented-out code, we probably won't need it

* Don't show "Delete" button for 1:1 chats

* Get rid of short flickering when declining a request

* Set the app's night mode to match the preference

This added 6ms to startup time, but I think that's OK, as
we will also be able to use more `-night` views in the future

* Make "Accept" text a bit brighter and easier to read in dark mode

* Check if the chattype is Group instead of members.length == 1
2021-07-26 13:01:59 +02:00
B. Petersen 39b67e8876 link to online privacy policy (this is also a gplay requirement) 2021-05-07 14:29:55 +02:00
adbenitez 7374982524 add share item in gallery selection menu 2021-04-19 16:53:13 -04:00
adbenitez c8efc72424 add details action to menu 2021-04-13 19:57:38 -04:00
adbenitez 7f358b0910 add more options to Gallery and Documents profile tabs 2021-04-13 18:59:23 -04:00
Hocuri 252bed8ac8 completely delete diskette icon, don't use it for "save log", either 2021-03-13 18:56:26 +01:00
Hocuri 6b3adf4831 Don't use the diskette icon for export attachment at all 2021-03-13 18:56:26 +01:00
Hocuri bf86badb1c Allow to share media from Delta Chat 2021-03-13 18:56:26 +01:00
B. Petersen 2c8bd39cd2 move email-address to subtitle, this is a unique element also used at other places; copy-to-clipboard goes to the menu 2021-03-09 01:59:17 +01:00
B. Petersen 44b0739f6c make profile-menu easier editable, show 'Encryption' item also in groups 2021-02-07 20:32:51 +01:00
bjoern 8d9c02dd7a add option to view full (html) message (#1763)
* add get-mime-original apis

* remove unused control

* add 'Show full message' buttons

* split reusable WebViewActivity from LocalHelpActivity

* add FullMsgActivity

* load html via AsyncTask

* adapt to changed api

* handle mailto:-links in WebView

* block loading remote images by default, add user setting always/once/never

* do not hide 'Once' button in always-mode, playing around a day with hidden 'Once' that looks more like a bug :)

* wording: as 'Always' affects all messages, it is better to speak of multiple senders

* wording: use 'Load remote images'

this makes it easier for the user to find the option
if one sees, images are missing in the document.

* wording: shorten text.

* wording: change 'may' to 'can'. 'may' sounds a bit as if someone allows this.

* Don't use AsyncTask

* check 'once' if appropriate

* use lite-colored checkbox-emoji in dark-theme

* add comment about missing error logging

Co-authored-by: Hocuri <hocuri@gmx.de>
2021-01-28 22:53:15 +01:00
B. Petersen cacbdd7c4f 'all media' just opens the gallery, better call it as such 2020-11-20 13:20:39 +01:00
B. Petersen 658c3af66b add 'show in chat' function 2020-11-20 13:20:38 +01:00
B. Petersen 4b0fca8e32 streamline gallery menu 2020-11-20 13:19:54 +01:00
B. Petersen 8853e320c0 remove 'forward' from gallery
- it forwards media together with the text,
  this is unexpected
- if forward is available, reply and reply-privately
  should be available as well, however, this seems to be a bit much.
- the function had issues which would need fixing.

instead, we will add a 'Show in chat' function that is more powerful
and fixes all of the things above.
2020-11-20 13:19:54 +01:00
B. Petersen b5c13818f2 priorize delete-function over export/copy
in the long-tap context menu, on smaller screens,
functions go to the overflow menu from right to left.

this pr gives the "delete" a higher priority than the
only sometimes available "export" function

- delete is always available on smaller screen -
  before, the icon was sometimes there and sometimes not,
  which is a bit irritating

- export gets a similar priority as copy

- on/off icons are now functions that are used
  less frequently
2020-10-27 15:10:04 +01:00
B. Petersen 27d747ebe4 use correct showAsAction value (it is overwritten by ConversationAdaptiveActionsToolbar, however, using a different value here is confusing 2020-10-20 16:00:46 +02:00
B. Petersen 71fefcde39 remove unused resend-option from menu 2020-10-20 15:56:18 +02:00
B. Petersen 66bb7c372a add an option to access the user-profile from the contact-list 2020-10-17 01:57:41 +02:00
B. Petersen 6e9ff3033a use string 'Delete contact' to delete contacts 2020-10-17 01:40:36 +02:00
Hocuri c720df5d5c Add swipe-to-reply quotes 2020-10-11 22:09:51 +03:00
B. Petersen 33cd22552f make 'disappearing messages' a standard-feature 2020-09-04 14:28:52 +02:00
cyberta 72411429cc update archive menu option, rely on core for chat visibility 2020-08-18 12:56:46 +02:00
B. Petersen 2f7386c9e0 update strings 2020-07-29 16:50:18 +02:00
B. Petersen 097be99446 adapt map icon to typical size of action bar icons 2020-07-29 14:00:02 +02:00
B. Petersen 95da8c4b9a add videochat icon to menu 2020-07-29 14:00:01 +02:00
B. Petersen fe2c33a6ba reword 'auto-delete' and 'message deletion' to 'disappearing messages' 2020-07-08 18:24:12 +02:00
Alexander Krotov 07c802c976 Update strings used for ephemeral messages
- For chat menu item, use already translated auto-delete string.
- For experimental setting, use untranslatable hard-coded string.
- Introduce a new translatable string for ephemeral dialog title
2020-07-01 22:53:54 +03:00
cyberta 6cb57a4227 show and hide ephemeral message entry in chat menu depending on experimental feature switch 2020-06-29 23:56:01 +03:00
B. Petersen 791b4adff8 move 'Switch account' out of experimental 2020-06-10 00:56:33 +02:00