the contacts in delta chat are more suggestion for e-mail addresses to create chats.
contacts that are in used by chats, cannot be deleted (they can be blocked).
however, sometimes the user wants to delete an contact from the list explictly, eg. he may have added it accidentially, a typo or whataever.
i would suggest to offer such an option via a long-click on a contact in the contact list.
the option should appear in the action bar as a trash bin then (same as for chats or messages)
Starting with this issue today.
cool :)
if it is not too much additional effort, a multi-select-delete would be great :)
On Thu, Oct 04, 2018 at 02:01 -0700, bj枚rn petersen wrote:
cool :)
it it is not too much additional effort, a multi-select-delete would be great :)
indeed, a general techqniue for multi-select would be great, eg
multi-select chats and archive/delete ... multi-select messages
and delete etc.
multi-select chats and archive/delete ... multi-select messages and delete etc.
these boths are already available in android-dev :)
Nearly done, just needs some cleanups and a fix for one edge case problem. Will probably be fixed tomorrow.
@Boehrsi cool - cu tomorrow :)
Added as requested.
cool - will check this out asap :)
@Boehrsi great job :)
esp. the "select all" followed by a delete which is sort of a cleanup, as contacts that are in use are not deleted at all (cc @Ampli-fier, i think this was one of your wishes some time ago :)
some nitpicking:
when any contact is long-pressed, the items "new group" and "new verified group" are grayed out - i think the idea is to show that they cannot be selected. however, i think they _look_ selected this way. i would not change the appearance of these values at all.
same for the "new contact", if it is there.
you can find out these "special" IDs by checking for id <= DC_CONTACT_ID_LAST_SPECIAL everything larger than DC_CONTACT_ID_LAST_SPECIAL is selectable and can be deleted if unused.
maybe related: sometimes, when playing around, the "new group" stays selected. eg. by long-clicking a real contact, clicking "select all" and pressing the system "back" button (not: the action bar back-button). after that "new contact" is selected although not being in selection-mode.
cc @Ampli-fier, i think this was one of your wishes some time ago :)
Yes, right.
As I couldn't code this for the UI I created a Core cmdline function that does the same.
Really great to have this finally in the UI :) :+1:
@r10s happy to hear it's overall working as intended :). In regards to the small review request:
Graying out that "special values" was a bit of work, but removing that is totally no effort. The UI normally does nothing there and I thought adding something would be a good idea. But I think you are right, it does more or less the opposite of the intended.
Removing that gray background as request in 1. will fix that problem.
I will adjust / fix the mentioned points on Monday. :)
Removed the background for disabled entries. The issues should now be fixed.
thanks, will have a look at this :)
@Boehrsi there is still a weird behavior on multi-selecting items:
moreover, having selected multiple contacts and clicking delete: this seems to delete only the first contact. i would suggest to add the deletion in a thread. also here, there is no need to redraw or so as DC_EVENT_CONTACTS_CHANGED are emitted on changes.
https://github.com/deltachat/deltachat-android-ii/issues/46 and https://github.com/deltachat/deltachat-android-ii/issues/81 are fixing some of the problems. The strange highlighting issue remains. I will tackle the latter now.
Should be fixed now. Finally. ;)
great. i added the deletion in a thread in https://github.com/deltachat/deltachat-android-ii/commit/179e8173c97cf2ae7da6ad65bf3c95d47c4bde5c - feel free to correct me if this is not good android/java style - i am no expert here :)
however, for now, this can be closed :)