mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
add chat_id to qr-code
This commit is contained in:
@@ -402,6 +402,9 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
||||
else if( position == showQrRow )
|
||||
{
|
||||
Intent intent2 = new Intent(getParentActivity(), QRshowActivity.class);
|
||||
Bundle b = new Bundle();
|
||||
b.putInt("chat_id", chat_id);
|
||||
intent2.putExtras(b);
|
||||
getParentActivity().startActivity(intent2);
|
||||
}
|
||||
else if (position == blockContactRow)
|
||||
|
||||
@@ -23,9 +23,15 @@ public class QRshowActivity extends Activity implements NotificationCenter.Notif
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_qrshow);
|
||||
|
||||
Bundle b = getIntent().getExtras();
|
||||
int chat_id = 0;
|
||||
if(b != null) {
|
||||
chat_id = b.getInt("chat_id");
|
||||
}
|
||||
|
||||
ImageView imageView = (ImageView) findViewById(R.id.myImage);
|
||||
try {
|
||||
Bitmap bitmap = encodeAsBitmap(MrMailbox.getSecurejoinQr(0));
|
||||
Bitmap bitmap = encodeAsBitmap(MrMailbox.getSecurejoinQr(chat_id));
|
||||
imageView.setImageBitmap(bitmap);
|
||||
} catch (WriterException e) {
|
||||
e.printStackTrace();
|
||||
|
||||
Reference in New Issue
Block a user