deltachat-desktop
deltachat-desktop copied to clipboard
"Block Contact" chat menu item displayed for an already blocked contact instead of "Unblock"
First of all, i believe this should be moved from the chat menu to the contact profile menu, see #4043 for discussion. At least on Android "Block/Unblock Contact" is there. (On Desktop there's no contact profile menu currently, you can only edit the contact name.) The second is that if a contact is already blocked, "Unblock Contact" should be displayed instead (as on Android). The third is that currently if i e.g. forgot that the contact is already blocked and do "Block Contact" again, the 1:1 chat is only deselected, but remains in the chatlist. But maybe this doesn't need to be fixed if "Unblock Contact" will be in the menu instead.
For reproduction: if you have a group with an already blocked contact, you can get to the 1:1 chat with it via the group members window >> click on the contact >> SEND MESSAGE.
the 1:1 chat is only deselected, but remains in the chatlist
i cannot reproduce that part. at least on my test on current master, blocked chats are directly removed from the chatlist. maybe there is some race, however.
+1 for the other points.
i cannot reproduce that part. at least on my test on current master, blocked chats are directly removed from the chatlist. maybe there is some race, however.
For me blocked 1:1 chats are removed from the chatlist only on first blocking. If i look up the chat somehow again (e.g. via a common group with the contact), it appears in the chatlist again and doesn't go away if i retry blocking. DC Desktop 1.46.1 (git: v1.33.0-881-g899f196d). Still, maybe this isn't worth fixing if "Block Contact" will be replaced with "Unblock Contact" if a contact is already blocked.
EDIT: But then it's a question what to do with such a reappeared 1:1 chat if the user doesn't want to unblock the contact. Hide it again after deselecting? Maybe this should be fixed in Core somehow.
EDIT: I suggest to debug why the chat reappears in the chatlist if the user only looked it up again. If the user didn't unblock it or draft/send any messages, so the contact/chat is still blocked, it shouldn't be shown in the chatlist.
EDIT: Checked Android, it's the same, the chat reappears. To hide it back the user should unblock the contact and block it again. Finally i think this is acceptable, may be even useful -- the user can message a blocked contact w/o unblocking it -- it really works.
~~Maybe we could show a dialog: You are sending a message to a blocked user, and if confirmed first unblock the user and then send the message~~ I think the best solution is: avoid chats with blocked contacts at all. So hide the "Send message" button for blocked users
I think the best solution is: avoid chats with blocked contacts at all. So hide the "Send message" button for blocked users
So if you blocked a contact, you can't even see the chat to remember why it's blocked.
In the "Contact" window menu "Unblock Contact" is already shown as expected, why can't we do the same for the 1:1 chat menu? The issue is mainly about this. But the UI can be even unified with DC Android where there's no "Block/Unblock Contact" item in the chat menu at all.
So if you blocked a contact, you can't even see the chat to remember why it's blocked.
I would expect that chats with blocked users don't show up any more. If you don't remember why you blocked someone you can unblock and look at the related chats. We also don't keept deleted chats to let you remember why you deleted a chat.
Showing chats with blocked users also has a lot of consequences in the UI, since we have to hide the send button, or the whole composer input, handle drafts (which already caused discussions how to show group chats if I'm not member anymore)
That's why I think hiding chats of blocked users is the best solution. Technically and UI wise...
Should be solved with #4353
Should be solved with #4353
Looks acceptable, but now we have different approaches here and on Android (there "Block"/"Unblock" is just not shown in the chat menu). Anyway thanks for fixing