sendComplete is only ever called from the message-send path, never the
draft path, so the passed chatId always equals this.chatId. The
refreshFragment branch and this.chatId = chatId assignment were dead
code. Removing them also eliminates the class of bug where an old
chatId could accidentally revert the activity's current chat.
Co-authored-by: adbenitez <24558636+adbenitez@users.noreply.github.com>
The previous fix captured `currentChatId` to stop the setDraft race
condition, but also changed `sendComplete(dcChat.getId())` to
`sendComplete(currentChatId)`. Java lambdas access instance fields via
`this`, so `dcChat.getId()` in the lambda reads the current value when
it runs — after `initializeResources()` updates `dcChat` to the private
chat, `sendComplete` naturally received the private chat ID. Passing
`currentChatId` (old group chat ID) instead caused `sendComplete` to
write `this.chatId = GROUP_CHAT_ID`, reverting the activity to the old
chat and triggering an unwanted fragment reload.
Co-authored-by: adbenitez <24558636+adbenitez@users.noreply.github.com>
Two fixes for the race condition that caused "reply privately" to
sometimes open the 1:1 chat without the quoted message:
1. In processComposeControls(), capture dcChat.getId() as currentChatId
before the background thread starts. Without this, initializeResources()
can change dcChat to the new private chat before the background thread
runs, causing it to overwrite the quote draft with an empty/wrong draft.
2. In InputPanel.setQuote(), if getMeasuredHeight() returns 0 after
measure(0,0) (view not yet laid out), fall back to WRAP_CONTENT instead
of animating to 0 height which would keep the quote view at 1px height.
Co-authored-by: adbenitez <24558636+adbenitez@users.noreply.github.com>
* fix: leave and delete finishes activity
the chat is gone - otherwise, we end up in ghost chat zero :)
moreover, the fix removes shortcuts from the homescreen.
a toast is no longer needed, as there is enough visual feedback;
we're also not showing a toast on plain deletion.
* use consistent string and clarify deletion scope
* deleting groups/channels is available after leaving only
* update CHANGELOG
* Update src/main/java/org/thoughtcrime/securesms/ConversationActivity.java
Co-authored-by: adb <adb@merlinux.eu>
* mailing lists are not encrypted
---------
Co-authored-by: adb <adb@merlinux.eu>