mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
fix: Don't crash when QR code can't be loaded (#3995)
Before this PR, when a QR code couldn't be loaded because of https://github.com/chatmail/core/pull/7399, Delta Chat crashed. Now, the button does nothing. It's not perfect, but easy to do, and only about an edge case where the user tried out the experimental broadcast channels in the past, and now tries to add a new member to a broadcast channel created with an old version of DC. The hollistic alternative would be to switch to RPC for getSecurejoinQrSvg, so that the UI can get a proper error message. --------- Co-authored-by: adb <adb@merlinux.eu>
This commit is contained in:
@@ -96,6 +96,12 @@ public class QrShowFragment extends Fragment implements DcEventCenter.DcEventDel
|
||||
imageView.setSVG(svg);
|
||||
} catch (SVGParseException e) {
|
||||
e.printStackTrace();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Activity activity = getActivity();
|
||||
if (activity != null) {
|
||||
activity.finish();
|
||||
}
|
||||
}
|
||||
|
||||
view.findViewById(R.id.share_link_button).setOnClickListener((v) -> showInviteLinkDialog());
|
||||
|
||||
Reference in New Issue
Block a user