mirror of
https://github.com/deltachat/deltachat-android.git
synced 2025-10-03 01:39:18 +02:00
feat: Adapt to channel-invite QR codes
This commit is contained in:
parent
5716372453
commit
9f63371909
4 changed files with 7 additions and 3 deletions
|
@ -49,6 +49,7 @@ public class DcContext {
|
|||
|
||||
public final static int DC_QR_ASK_VERIFYCONTACT = 200;
|
||||
public final static int DC_QR_ASK_VERIFYGROUP = 202;
|
||||
public final static int DC_QR_ASK_JOIN_BROADCAST= 204;
|
||||
public final static int DC_QR_FPR_OK = 210;
|
||||
public final static int DC_QR_FPR_MISMATCH = 220;
|
||||
public final static int DC_QR_FPR_WITHOUT_ADDR = 230;
|
||||
|
|
|
@ -314,11 +314,9 @@ public class ProfileAdapter extends RecyclerView.Adapter
|
|||
if (dcChat != null) {
|
||||
if (dcChat.canSend() && dcChat.isEncrypted()) {
|
||||
itemData.add(new ItemData(ITEM_MEMBERS, DcContact.DC_CONTACT_ID_ADD_MEMBER, 0));
|
||||
if (!isOutBroadcast) {
|
||||
itemData.add(new ItemData(ITEM_MEMBERS, DcContact.DC_CONTACT_ID_QR_INVITE, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int value : memberList) {
|
||||
itemData.add(new ItemData(ITEM_MEMBERS, value, 0));
|
||||
}
|
||||
|
|
|
@ -43,6 +43,7 @@ public class QrCodeHandler {
|
|||
switch (qrParsed.getState()) {
|
||||
case DcContext.DC_QR_ASK_VERIFYCONTACT:
|
||||
case DcContext.DC_QR_ASK_VERIFYGROUP:
|
||||
case DcContext.DC_QR_ASK_JOIN_BROADCAST:
|
||||
showVerifyContactOrGroup(activity, builder, rawString, qrParsed, name);
|
||||
break;
|
||||
|
||||
|
@ -225,6 +226,9 @@ public class QrCodeHandler {
|
|||
case DcContext.DC_QR_ASK_VERIFYGROUP:
|
||||
msg = activity.getString(R.string.qrscan_ask_join_group, qrParsed.getText1());
|
||||
break;
|
||||
case DcContext.DC_QR_ASK_JOIN_BROADCAST:
|
||||
msg = activity.getString(R.string.qrscan_ask_join_channel, qrParsed.getText1());
|
||||
break;
|
||||
default:
|
||||
msg = activity.getString(R.string.ask_start_chat_with, name);
|
||||
break;
|
||||
|
|
|
@ -1005,6 +1005,7 @@
|
|||
<string name="qrscan_hint_desktop">Move the QR code to the camera</string>
|
||||
<string name="qrscan_failed">QR code could not be decoded</string>
|
||||
<string name="qrscan_ask_join_group">Do you want to join the group \"%1$s\"?</string>
|
||||
<string name="qrscan_ask_join_channel">Do you want to join the channel \"%1$s\"?</string>
|
||||
<string name="qrscan_fingerprint_mismatch">The scanned fingerprint does not match the last seen for %1$s.</string>
|
||||
<string name="qrscan_no_addr_found">This QR code contains a fingerprint but no address.\n\nFor an out-of-band-verification, please establish an encrypted connection to the recipient first.</string>
|
||||
<string name="qrscan_contains_text">Scanned QR code text:\n\n%1$s</string>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue