forked from mirror/monocles_chat
make domain selection available from invitation links
fixes https://github.com/kriztan/Pix-Art-Messenger/issues/505
This commit is contained in:
parent
44a6e801ea
commit
40866a0274
2 changed files with 10 additions and 2 deletions
|
@ -73,6 +73,11 @@ public class MagicCreateActivity extends XmppActivity implements TextWatcher, Ad
|
|||
Collections.sort(domains, String::compareToIgnoreCase);
|
||||
final ArrayAdapter<String> adapter = new ArrayAdapter<>(this, android.R.layout.simple_selectable_list_item, domains);
|
||||
int defaultServer = adapter.getPosition("blabber.im");
|
||||
if (this.preAuth != null && domain != null) {
|
||||
binding.server.setEnabled(false);
|
||||
binding.useOwn.setEnabled(false);
|
||||
binding.useOwn.setChecked(true);
|
||||
}
|
||||
binding.useOwn.setOnCheckedChangeListener(this);
|
||||
binding.server.setAdapter(adapter);
|
||||
binding.server.setSelection(defaultServer);
|
||||
|
@ -191,7 +196,9 @@ public class MagicCreateActivity extends XmppActivity implements TextWatcher, Ad
|
|||
}
|
||||
|
||||
private void updateFullJidInformation(String username) {
|
||||
if (this.preAuth == null) {
|
||||
this.domain = binding.server.getSelectedItem().toString();
|
||||
}
|
||||
if (username.trim().isEmpty()) {
|
||||
binding.fullJid.setVisibility(View.INVISIBLE);
|
||||
} else {
|
||||
|
|
|
@ -75,7 +75,8 @@ public final class ScanActivity extends Activity implements SurfaceTextureListen
|
|||
|
||||
private static final long VIBRATE_DURATION = 50L;
|
||||
private static final long AUTO_FOCUS_INTERVAL_MS = 2500L;
|
||||
private static boolean DISABLE_CONTINUOUS_AUTOFOCUS = Build.MODEL.equals("GT-I9100") // Galaxy S2
|
||||
private static boolean DISABLE_CONTINUOUS_AUTOFOCUS =
|
||||
Build.MODEL.equals("GT-I9100") // Galaxy S2
|
||||
|| Build.MODEL.equals("SGH-T989") // Galaxy S2
|
||||
|| Build.MODEL.equals("SGH-T989D") // Galaxy S2 X
|
||||
|| Build.MODEL.equals("SAMSUNG-SGH-I727") // Galaxy S2 Skyrocket
|
||||
|
|
Loading…
Add table
Reference in a new issue