mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
close qr-show activity after all pending joins are done successfully
This commit is contained in:
@@ -17,11 +17,15 @@ public class QRshowActivity extends Activity implements NotificationCenter.Notif
|
||||
public final static int WIDTH = 400;
|
||||
public final static int HEIGHT = 400;
|
||||
|
||||
public int num_joiners;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_qrshow);
|
||||
|
||||
num_joiners = 0;
|
||||
|
||||
Bundle b = getIntent().getExtras();
|
||||
int chat_id = 0;
|
||||
if(b != null) {
|
||||
@@ -78,14 +82,20 @@ public class QRshowActivity extends Activity implements NotificationCenter.Notif
|
||||
String msg = null;
|
||||
if( step == 3) {
|
||||
msg = String.format(ApplicationLoader.applicationContext.getString(R.string.OobSecureJoinRequested), MrMailbox.getContact(contact_id).getNameNAddr());
|
||||
num_joiners++;
|
||||
}
|
||||
else if( step == 6 ){
|
||||
msg = String.format(ApplicationLoader.applicationContext.getString(R.string.OobAddrVerified), MrMailbox.getContact(contact_id).getNameNAddr());
|
||||
num_joiners--;
|
||||
}
|
||||
|
||||
if( msg != null ) {
|
||||
AndroidUtilities.showHint(ApplicationLoader.applicationContext, msg);
|
||||
}
|
||||
|
||||
if( step == 6 && num_joiners <= 0 ) {
|
||||
finish();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user