mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
fix: leave and delete finishes activity (#4266)
* 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
This commit is contained in:
@@ -729,7 +729,8 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
||||
.setNegativeButton(R.string.menu_leave_and_delete, (d, which) -> {
|
||||
DcHelper.getContext(context).removeContactFromChat(chatId, DcContact.DC_CONTACT_ID_SELF);
|
||||
DcHelper.getContext(context).deleteChat(chatId);
|
||||
Toast.makeText(this, getString(R.string.done), Toast.LENGTH_SHORT).show();
|
||||
DirectShareUtil.clearShortcut(this, chatId);
|
||||
finish();
|
||||
})
|
||||
.setNeutralButton(R.string.cancel, null)
|
||||
.show();
|
||||
@@ -753,7 +754,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
||||
private void handleDeleteChat() {
|
||||
AlertDialog dialog = new AlertDialog.Builder(this)
|
||||
.setMessage(getResources().getString(R.string.ask_delete_named_chat, dcChat.getName()))
|
||||
.setPositiveButton(R.string.delete, (d, which) -> {
|
||||
.setPositiveButton(R.string.delete_for_me, (d, which) -> {
|
||||
DcHelper.getContext(context).deleteChat(chatId);
|
||||
DirectShareUtil.clearShortcut(this, chatId);
|
||||
finish();
|
||||
|
||||
Reference in New Issue
Block a user