Merge pull request #212 from deltachat/qrnormalchat

show qr-invite code also for normal chats
This commit is contained in:
björn petersen
2019-01-11 15:14:42 +01:00
committed by GitHub
5 changed files with 5 additions and 9 deletions
-1
View File
@@ -105,7 +105,6 @@
app:cpb_colorProgress="@color/textsecure_primary"
app:cpb_cornerRadius="20dp"
app:cpb_selectorIdle="@drawable/progress_button_state"
android:visibility="gone"
app:cpb_textIdle="@string/qrshow_title"/>
</LinearLayout>
+2
View File
@@ -416,6 +416,7 @@
<!-- qr code stuff -->
<string name="qrscan_title">Scan QR code</string>
<string name="qrscan_hint">Place your camera over the QR code</string>
<string name="qrscan_ask_join_group">Do you want to join the group \"%1$s\"?</string>
<string name="qrscan_ask_join_verified_group">Do you want to join the verified group \"%1$s\"?</string>
<string name="qrscan_ask_fingerprint_ask_oob">Verify contact and start chatting with \"%1$s\"?</string>
<string name="qrscan_ask_chatting_fingerprint_ok">Contact \"%1$s\" verified. Start chatting?</string>
@@ -429,6 +430,7 @@
<string name="qrshow_x_joining">%1$s joins.</string>
<string name="qrshow_x_verified">%1$s verified.</string>
<string name="qrshow_x_has_joined_group">%1$s securely joined the group.</string>
<string name="qrshow_join_group_hint">Scan this to join the group \"%1$s\".</string>
<string name="qrshow_join_verified_group_hint">Scan this to join the verified group \"%1$s\".</string>
<string name="qrshow_join_verified_group_title">QR invite code</string>
<string name="qrshow_join_contact_title">QR verify code</string>
@@ -95,7 +95,6 @@ public class GroupCreateActivity extends PassphraseRequiredActionBarActivity
private ImageView avatar;
private TextView creatingText;
private Bitmap avatarBmp;
private CircularProgressButton verifyButton;
private Integer editGroupChatId = null;
@Override
@@ -209,16 +208,12 @@ public class GroupCreateActivity extends PassphraseRequiredActionBarActivity
avatar = ViewUtil.findById(this, R.id.avatar);
groupName = ViewUtil.findById(this, R.id.group_name);
creatingText = ViewUtil.findById(this, R.id.creating_group_text);
verifyButton = ViewUtil.findById(this, R.id.verify_button);
SelectedRecipientsAdapter adapter = new SelectedRecipientsAdapter(this);
adapter.setOnRecipientDeletedListener(this);
lv.setAdapter(adapter);
findViewById(R.id.add_member_button).setOnClickListener(new AddRecipientButtonListener());
if (verified) {
verifyButton.setOnClickListener(new ShowQrButtonListener());
verifyButton.setVisibility(View.VISIBLE);
}
ViewUtil.findById(this, R.id.verify_button).setOnClickListener(new ShowQrButtonListener());
initializeAvatarView();
}
@@ -62,7 +62,7 @@ public class QrShowActivity extends AppCompatActivity implements DcEventCenter.D
if (chatId != 0) {
// verified-group
String groupName = dcContext.getChat(chatId).getName();
hint = String.format(this.getString(R.string.qrshow_join_verified_group_hint), groupName);
hint = String.format(this.getString(R.string.qrshow_join_group_hint), groupName);
supportActionBar.setTitle(groupName);
supportActionBar.setSubtitle(R.string.qrshow_join_verified_group_title);
} else {
@@ -149,7 +149,7 @@ public class QrScanHandler implements DcEventCenter.DcEventDelegate {
String msg;
switch (qrParsed.getState()) {
case DcContext.DC_QR_ASK_VERIFYGROUP:
msg = String.format(activity.getString(R.string.qrscan_ask_join_verified_group), qrParsed.getText1());
msg = String.format(activity.getString(R.string.qrscan_ask_join_group), qrParsed.getText1());
break;
default:
msg = String.format(activity.getString(R.string.qrscan_ask_fingerprint_ask_oob), nameNAddr);