diff --git a/CHANGELOG.md b/CHANGELOG.md index a3e4940a3..e233f6d7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ * target Android 15 * improve readability of info messages in dark mode * fix Direct Share shortcuts +* fix: don't show error message when cancelling profile creation ## v2.11.0 2025-08 diff --git a/src/main/java/org/thoughtcrime/securesms/InstantOnboardingActivity.java b/src/main/java/org/thoughtcrime/securesms/InstantOnboardingActivity.java index 28b5257f2..1e83a7f73 100644 --- a/src/main/java/org/thoughtcrime/securesms/InstantOnboardingActivity.java +++ b/src/main/java/org/thoughtcrime/securesms/InstantOnboardingActivity.java @@ -87,7 +87,10 @@ public class InstantOnboardingActivity extends BaseActionBarActivity implements private AttachmentManager attachmentManager; private Bitmap avatarBmp; + private @Nullable ProgressDialog progressDialog; + private boolean cancelled; + private DcContext dcContext; @Override @@ -433,7 +436,6 @@ public class InstantOnboardingActivity extends BaseActionBarActivity implements } private void progressSuccess() { - DcHelper.getEventCenter(this).endCaptureNextError(); if (progressDialog != null) { progressDialog.dismiss(); } @@ -492,11 +494,14 @@ public class InstantOnboardingActivity extends BaseActionBarActivity implements progressDialog = null; } + cancelled = false; + progressDialog = new ProgressDialog(this); progressDialog.setMessage(getResources().getString(R.string.one_moment)); progressDialog.setCanceledOnTouchOutside(false); progressDialog.setCancelable(false); progressDialog.setButton(DialogInterface.BUTTON_NEGATIVE, getResources().getString(android.R.string.cancel), (dialog, which) -> { + cancelled = true; dcContext.stopOngoingProcess(); }); progressDialog.show(); @@ -507,9 +512,13 @@ public class InstantOnboardingActivity extends BaseActionBarActivity implements Rpc rpc = DcHelper.getRpc(this); try { rpc.addTransportFromQr(dcContext.getAccountId(), qrCode); + DcHelper.getEventCenter(this).endCaptureNextError(); progressSuccess(); } catch (RpcException e) { - Util.runOnMain(() -> progressError(e.getMessage())); + DcHelper.getEventCenter(this).endCaptureNextError(); + if (!cancelled) { + Util.runOnMain(() -> progressError(e.getMessage())); + } } }).start(); } diff --git a/src/main/java/org/thoughtcrime/securesms/RegistrationActivity.java b/src/main/java/org/thoughtcrime/securesms/RegistrationActivity.java index 019cedd33..3278aa6a4 100644 --- a/src/main/java/org/thoughtcrime/securesms/RegistrationActivity.java +++ b/src/main/java/org/thoughtcrime/securesms/RegistrationActivity.java @@ -87,6 +87,7 @@ public class RegistrationActivity extends BaseActionBarActivity implements DcEve private Group advancedGroup; private ImageView advancedIcon; private ProgressDialog progressDialog; + private boolean cancelled = false; Spinner imapSecurity; Spinner smtpSecurity; @@ -563,6 +564,7 @@ public class RegistrationActivity extends BaseActionBarActivity implements DcEve return; } + cancelled = false; setupConfig(); if (progressDialog != null) { @@ -574,7 +576,10 @@ public class RegistrationActivity extends BaseActionBarActivity implements DcEve progressDialog.setMessage(getString(R.string.one_moment)); progressDialog.setCanceledOnTouchOutside(false); progressDialog.setCancelable(false); - progressDialog.setButton(DialogInterface.BUTTON_NEGATIVE, getString(android.R.string.cancel), (dialog, which) -> stopLoginProcess()); + progressDialog.setButton(DialogInterface.BUTTON_NEGATIVE, getString(android.R.string.cancel), (dialog, which) -> { + cancelled = true; + DcHelper.getContext(this).stopOngoingProcess(); + }); progressDialog.show(); } @@ -613,11 +618,13 @@ public class RegistrationActivity extends BaseActionBarActivity implements DcEve startActivity(conversationList); finish(); } catch (RpcException e) { - Util.runOnMain(() -> { - DcHelper.getEventCenter(this).endCaptureNextError(); - progressDialog.dismiss(); - WelcomeActivity.maybeShowConfigurationError(this, e.getMessage()); - }); + DcHelper.getEventCenter(this).endCaptureNextError(); + if (!cancelled) { + Util.runOnMain(() -> { + progressDialog.dismiss(); + WelcomeActivity.maybeShowConfigurationError(this, e.getMessage()); + }); + } } }).start(); } @@ -631,10 +638,6 @@ public class RegistrationActivity extends BaseActionBarActivity implements DcEve return value.isEmpty()? null : value; } - private void stopLoginProcess() { - DcHelper.getContext(this).stopOngoingProcess(); - } - @Override public void handleEvent(@NonNull DcEvent event) { if (event.getId()==DcContext.DC_EVENT_CONFIGURE_PROGRESS) { diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index cced2242a..8914a2144 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -240,12 +240,6 @@ Chat with… Clone Chat - - Broadcast List - - Broadcast Lists - - New Broadcast List Channel @@ -253,12 +247,6 @@ New Channel Add Recipients - - Edit Broadcast List - - Broadcast List Name - - Please enter a name for the broadcast list. Channel Name E-Mail @@ -424,8 +412,6 @@ Chat with %1$s? Remove %1$s from group? - - Remove %1$s from broadcast list? Remove %1$s from channel? Do you want to open this link? @@ -457,8 +443,6 @@ Send a message to %1$s. - - In a broadcast list, recipients will receive messages in a read-only chat with you. Channels are a one-to-many tool for broadcasting your messages. Others will only see this group after you sent a first message. @@ -569,11 +553,6 @@ Square Grid Send Message - - %1$s changed their address from %2$s to %3$s - - You changed your email address from %1$s to %2$s.\n\nIf you now send a message to a verified group, contacts there will automatically replace the old with your new address.\n\nIt\'s highly advised to set up your old email provider to forward all emails to your new email address. Otherwise you might miss messages of contacts who did not get your new address yet. - @@ -975,14 +954,8 @@ You set disappearing messages timer to %1$s weeks. Disappearing messages timer set to %1$s weeks by %2$s. - - %1$s sent a message from another device. Messages are end-to-end encrypted. Tap to learn more. All messages in this chat are end-to-end encrypted.\n\nEnd-to-end encryption keeps messages private between you and your chat partners. Not even servers, providers or relays can read them. - - %1$s sent a message from another device. Tap to learn more. - - End-to-end encryption cannot be guaranteed anymore, likely because %1$s reinstalled Delta Chat or sent a message from another device.\n\nYou may meet them in person and scan their QR code again to reestablish guaranteed end-to-end encryption. ⚠️ %1$s requires end-to-end encryption which is not setup for this chat yet. Tap to learn more. To establish end-to-end-encryption, you may meet contacts in person and scan their QR Code to introduce them. Learn More @@ -1041,19 +1014,11 @@ %1$s replied, waiting for being added to the group… Establishing end-to-end encryption, please wait… - - Could not yet establish guaranteed end-to-end encryption, but you may already send a message. - - The contact must be online to proceed.\n\nThis process will continue automatically in background. %1$s introduced. - - Cannot establish end-to-end encryption with %1$s. Introduced by %1$s Introduced by me Introduced - - Changed setup for %1$s. To guarantee end-to-end-encryption, you can only add contacts with a green checkmark to this group.\n\nYou may meet contacts in person and scan their QR Code to introduce them. Select chat to send the message to @@ -1096,9 +1061,6 @@ Flip Rotate - - Encrypted message - This is the official Delta Chat Desktop app. This software is licensed under GNU GPL version 3 and the source code is available on GitHub. @@ -1213,7 +1175,6 @@ Delta Chat wants to save images to your photo library. Delta Chat can use Face ID to protect your local profile, backup creation and second device setup. - Instant Delivery Use Background Connection @@ -1228,8 +1189,4 @@ What\'s new?\n\n💯 End-to-end encryption is reliable and forever now. Padlocks 🔒 are gone!\n\n✉️ Classic email without end-to-end encryption is marked with a letter symbol\n\n😻 New enhanced profile screen for all your contacts\n\n🔲 New button for quick access to apps used in a chat\n\n❤️ Please donate to help us remain independent and continue to bring improvements: %1$s - - What\'s new?\n\n❤️‍🔥 New emojis picker with more emoji\n\n🎮 Enhanced in-chat apps: Get notifications and open supporting apps in context, i.e. open an added calendar entry directly\n\n👍 Get notified about reactions to your messages\n\n... 🛠️ FIXES and EVEN MORE at %1$s - - ℹ️ \"Switch Profile\" option moved: Tap your profile image in the upper corner of the main screen to add or switch profiles 💡