Commit Graph

1896 Commits

Author SHA1 Message Date
adbenitez e1c52835e5 set click listener in AccountViewHolder 2021-10-10 13:43:37 -04:00
adbenitez 1895e30a9b adapt delete button to theme 2021-10-10 13:12:45 -04:00
adbenitez 746c666148 improve fallback avatar in account list 2021-10-10 02:05:58 -04:00
adbenitez 811f8eaf0b add unread count badge to account selector 2021-10-10 00:39:56 -04:00
adbenitez 3880fd67a5 improve the account selector dialog 2021-10-09 23:05:07 -04:00
Hocuri 624a1d08f2 Merge pull request #2065 from deltachat/fix-shared-image-being-set-as-draft-repeatedly
Fix shared image being set as draft repeatedly (Fix #2040)

The problem was that 

      if (isDirectSharing(this)) {
        openConversation(getDirectSharingChatId(this), -1);
      }

was called in refreshTitle(). But refreshTitle() is also called everytime the connectivity changes, so everytime the connectivity changes a new instance of ConversationActivity was opened.

The last three commits are actually independent (but I think uncontroversial) improvements, if you want I can also make a separate PR for this.
2021-10-05 11:01:23 +02:00
Asiel Díaz Benítez c9689097d4 Merge pull request #2061 from deltachat/adb-issue-2016
Disable group editing actions if user can't edit group (ex. self not in group)
2021-10-04 17:00:51 -04:00
Hocuri b495b847f4 Remove forgotten dbg statement 2021-10-04 16:03:19 +02:00
Hocuri 0f102ffc88 Fix #2040 2021-10-04 16:03:19 +02:00
Hocuri a2ffa4cd5a Add very basic onboarding and sharing test (#2031)
* Start creating onboarding test

* Start adding sharing test

* Create very basic sharing test
2021-10-04 15:58:07 +02:00
adbenitez 02588ebb8b hidde add-member and qr-invite buttons if they can't be used at the moment 2021-10-03 16:57:54 -04:00
Hocuri 1b6965e43e Fix back button not working in connectivity view sometimes (#2064)
I noticed that sometimes the system back button (the one in the lower
left) does not work in the connectivity view. The top bar back button
worked.

This should fix this.

Also, I moved `getSupportActionBar().setTitle(R.string.connectivity)` to onCreate(). It had been in refresh() so that the title could be set to "Connectivity | Connected", "Connectivity | Connecting" and so on. But as we decided not to do this, there is no reason for it to be in refresh().
2021-10-03 16:50:39 +02:00
adbenitez bf8ceed829 disable group editing actions for contact requests and groups where it doesn't makes sense (ex. self is not in group) 2021-10-02 00:20:39 -04:00
adbenitez 404c40379c disable buttons actions if user can't send in group 2021-10-02 00:15:33 -04:00
bjoern a73f17144b add usage string for connectivity view (#2066)
moreover, fix the id used for 'Broadcast List'
2021-10-01 22:28:37 +02:00
bjoern 1eed088f66 rename isGroup() to isMultiUser() (#2063)
* rename isGroup() to isMultiUser()

* rename isGroupConversation()/isPushGroupConversation() to isMultiUser()

* rename chatIsGroup to chatIsMultiUser

* rename isGroupRecipient() to isMultiUserRecipient()
2021-09-30 21:31:18 +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
bjoern 3af9fdcea6 do not say, device-messages can be deleted from the server somehow (#2059)
it is a bit nitpicking and also a cornercase,
however, yes, it was not correct before.
2021-09-24 18:04:33 +02:00
bjoern d7072d57df add translations recently needed by core: connectivity, quota, device messages and some other bits (#2053) 2021-09-21 01:00:26 +02:00
bjoern beb601bc06 do not download large messages automatically (#2045)
* add download-ffi methods

* add 'Download' button for incomplete messages

* show 'downloading' animation

* make download_limit configurable

* set button to 'disabled' and text to 'Downloading...' on downloading; color does not really reflect that yet, but that can probably be tweaked by xml

* make 'download message body' translatable
2021-09-13 23:07:49 +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 5b937b5653 profile: show tab containing 'status' for device chat (#2039)
the device chat's status contains some useful information
since https://github.com/deltachat/deltachat-core-rust/pull/2613 -
unfortunately, the whole tab was hidden on android.

ios and desktop should be fine in this regard.
2021-08-20 22:56:28 +02:00
bjoern ed1b363d70 add device message for 1.22 (#2036)
* add device message for 1.22

* adapt 1.22 device message for ios, for desktop, update_1_22 could fit (or we can add another later)
2021-08-20 17:58:27 +02:00
Hocuri 1222e6fc90 Remove RequiresApi(19) annotation on ScribbleActivity (#2033)
These annotations don't actually have an effect, but they lead to an
error (not a warning) being shown in Android Studio. It still compiles
fine, though.

The line `case ScribbleActivity.SCRIBBLE_REQUEST_CODE:` in
ConversationActivity was therefore shown as an error all the time, which
was really annoying.

The alternative would be to suppress the error in ConversationActivity.
2021-08-17 23:15:11 +02:00
bjoern a08f8ed527 hide 'search' option in connectivity view (#2035)
it is currently just not needed for a dialog-style html-page,
but raises the question what can be searched here.

if it turns out a search function becomes useful,
we can easily re-add it.
2021-08-17 23:12:53 +02:00
Hocuri e2b2d6bea4 [WIP] Fix "Can't edit shared image" (#2034)
Fix #2032

The problem was that after returning from the image editor, `doReinitializeDraft` was true and therefore we the draft was reinitialized to the originally shared, unedited image.

This was introduced in
https://github.com/deltachat/deltachat-android/pull/1770. I im pretty
sure that what I changed is fine, but we had so many regressions in the
past in this area that we should thoroughly test this change before
merging.

I extended
https://github.com/deltachat/interface/edit/master/user-testing/mailto-links.md
a bit; before merging this PR we should test that everything there still
works.
2021-08-16 12:39:58 +02:00
Asiel Díaz Benítez ffd58739ed Merge pull request #2027 from deltachat/adb-issue-1992
reload adapter's dcChat when chat is modified
2021-08-12 15:05:30 -04:00
Hocuri b8cbc6d3b0 Add some @NonNull annotations, remove unused method (#2028)
This was in an attempt to find the cause for #2026. I didn't succeed,
but this is an improvement, anyway.
2021-08-11 23:13:12 +02:00
Hocuri f7b74e4963 Add simple benchmark & a test framework (#2022)
See #2019, #2020 and #2021 for failed attempts at using a benchmark framework. So, for now I'll just go with timing the results manually. 

For trying this out:
- Backup your current account first, maybe there are some bugs in switching accounts.
- You can run benchmarks on either an emulated device or a real device. For better benchmark results, you should run the benchmark on a real device and make sure that the core is compiled in release mode.
- Disable animations on your device, otherwise the test may fail. (Developer options -> Window animation scale, Transition animation scale & Animatior duration scale -> set all three of them to 0x)
- In Android Studio: File -> Sync project with gradle files
- In Android Studio: Run -> Edit configurations -> `+` -> Android Instrumented test -> Either select a specific class or select "All in Module" -> OK -> Select your configuration in the toolbar -> Click on the green "run" button in the toolbar to run the tests

When the benchmark is done, you will get a result like `MEASURED RESULTS (Benchmark) - Going thorough all 10 chats: 11635,11207,11363,11352,11279,11183,11137,11145,11032,11057`, Paste `11635,11207,11363,11352,11279,11183,11137,11145,11032,11057` into a cell in a LibreOffice spreadsheet, do `Data -> Text to columns`, choose `,` as a separator, hit `OK`, and create a diagram.
2021-08-11 14:01:15 +02:00
adbenitez 3327812628 reload adapter's dcChat when chat is modified 2021-08-10 23:08:12 -04:00
Hocuri 44ffbdbb58 Fix: When searching, entering an archived chat, and going back, go back to search (#2025)
Steps to reproduce the bug:
- Search and select an archived chat
- Press back

Expected: Go back to the search activity.
Actual: Go to the Archived chats list activity. The user has to press
"back" again to get to the search.
2021-08-10 17:06:05 +02:00
Hocuri 5952f30334 Fix: When returning to chat after blocking it, hide request buttons (#2023)
Steps to reproduce the bug:

- Go to a contact request
- Go to the profile
- Block the contact
- Press back

Expected behavior: Only the compose panel is shown, not the request
buttons.
Actual behavior: Both the panel and the request buttons are shown
because the panel visibility is updated, but not the request button's.

I fixed this by always calling `initializeContactRequest()` after
`setComposePanelVisibility()`.
2021-08-10 17:05:43 +02:00
Hocuri 93d9a84cae Fix: When blocking a contact from the profile, update the chatlist (#2024)
Steps to reproduce:

- Go to the profile of a contact
- Block the contact
- Press back twice

Expected behavior: The chat is not shown in the list anymore.
Actual behavior: The chat is shown in the list until the app is
restarted (or if you wait some time)
2021-08-10 17:05:30 +02:00
bjoern 1c36190c87 validate email-addresses in core (#2015)
successor of #1980,
allowing to add contacts with dotless email-domains to groups;
that is needed eg. for @yggmail
2021-08-08 22:05:34 +02:00
bjoern 726f751cac keep selection when migrating several accounts (#2011)
postpone selection after the last migration
as migrateAccount() currently selects the migrated account.

before, the selectAccount() call was useless
if another migrateAccount() call follows.
2021-08-04 15:05:45 +02:00
Asiel Díaz Benítez 9be90a589e avoid NullPointerException (#2013) 2021-08-04 15:05:33 +02:00
Asiel Díaz Benítez 099f76a90b set dynamic theme in welcome activity (#2008) 2021-08-02 00:20:34 +02:00
Asiel Díaz Benítez 13dbb3f87c avoid showing compose panel when pressing block button (#2004)
* stop observing DC_EVENT_CONTACTS_CHANGED events before blocking chat so the input bar is not made visible in handleEvent()

* add comment about removing DC_EVENT_CONTACTS_CHANGED observer on blocking

Co-authored-by: B. Petersen <r10s@b44t.com>
2021-08-01 23:29:22 +02:00
Asiel Díaz Benítez 464c30129f update archived chatlist when contact request is blocked, set intent so conversationListFragment can find RELOAD_LIST in extras (#2003) 2021-08-01 22:26:19 +02:00
Asiel Díaz Benítez 6bd46a8532 Merge pull request #1985 from deltachat/use-accounts-api
use dc_accounts_t
2021-07-31 16:19:33 -04:00
bjoern 06353ef64d fix potential race condition in chatlist loading (#2001)
this should fix the race condition mentioned at #2000
and in the source code by synchronizing getters/setters of the booleans.
2021-07-31 21:24:20 +02:00
bjoern 6de566ac11 fix chatlist anr (#2000)
* revert unneeded changed introduced at #1975 - the timer is to update relative timestamps, data reloading is not needed and driven by events

* load chatlist async

* debounce chatlist loading

* add comment to the code
2021-07-31 13:56:39 +02:00
Asiel Díaz Benítez 72acc5fffc separate request and archive badges (#1997) 2021-07-30 12:43:10 +02:00
bjoern a7d6dda1a3 hide question from request panel for now (#1996)
* hide question from request panel for now, if needed we can do something more specific in the future

* remove 'Done' toast to avoid problems with lost activity

for whatever reason,
i just got a crash related to the toast that could not find its activity,
probably we should have used the app context and not the activity.

however, the toast was annoying me already,
there is no point in adding it, the change is visible instantly to the user
on the screen.
2021-07-29 23:36:16 +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
bjoern 6d8da07409 Update src/org/thoughtcrime/securesms/connect/AccountManager.java
Co-authored-by: Hocuri <hocuri@gmx.de>
2021-07-28 16:53:03 +02:00
bjoern a6490bf4cb Update src/org/thoughtcrime/securesms/connect/AccountManager.java
Co-authored-by: Hocuri <hocuri@gmx.de>
2021-07-28 16:52:54 +02:00
B. Petersen 1c4b06c501 int can't be @Nullable 2021-07-28 16:44:28 +02:00
B. Petersen c94ec36814 remove superfluous string (that change was lost during rebase) 2021-07-27 00:17:16 +02:00
B. Petersen 7959053429 process events belonging to current context only 2021-07-26 21:37:33 +02:00