Fix issue #500 - Crash due to proxy - Disable DNS check
This commit is contained in:
parent
495bc70ffb
commit
e8ab16747d
|
@ -1190,7 +1190,7 @@ public class Helper {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
Proxy proxy = new Proxy(type == 0 ? Proxy.Type.HTTP : Proxy.Type.SOCKS,
|
Proxy proxy = new Proxy(type == 0 ? Proxy.Type.HTTP : Proxy.Type.SOCKS,
|
||||||
new InetSocketAddress(hostVal, portVal));
|
InetSocketAddress.createUnresolved(hostVal, portVal));
|
||||||
Authenticator.setDefault(new Authenticator() {
|
Authenticator.setDefault(new Authenticator() {
|
||||||
@Override
|
@Override
|
||||||
protected PasswordAuthentication getPasswordAuthentication() {
|
protected PasswordAuthentication getPasswordAuthentication() {
|
||||||
|
|
|
@ -75,7 +75,7 @@ public class FragmentLoginMain extends Fragment {
|
||||||
|
|
||||||
binding = FragmentLoginMainBinding.inflate(inflater, container, false);
|
binding = FragmentLoginMainBinding.inflate(inflater, container, false);
|
||||||
View root = binding.getRoot();
|
View root = binding.getRoot();
|
||||||
|
InstanceSocialVM instanceSocialVM = new ViewModelProvider(FragmentLoginMain.this).get(InstanceSocialVM.class);
|
||||||
binding.menuIcon.setOnClickListener(this::showMenu);
|
binding.menuIcon.setOnClickListener(this::showMenu);
|
||||||
binding.loginInstance.setOnItemClickListener((parent, view, position, id) -> oldSearch = parent.getItemAtPosition(position).toString().trim());
|
binding.loginInstance.setOnItemClickListener((parent, view, position, id) -> oldSearch = parent.getItemAtPosition(position).toString().trim());
|
||||||
binding.loginInstance.addTextChangedListener(new TextWatcher() {
|
binding.loginInstance.addTextChangedListener(new TextWatcher() {
|
||||||
|
@ -101,7 +101,7 @@ public class FragmentLoginMain extends Fragment {
|
||||||
}
|
}
|
||||||
if (oldSearch == null || !oldSearch.equals(s.toString().trim())) {
|
if (oldSearch == null || !oldSearch.equals(s.toString().trim())) {
|
||||||
searchInstanceRunning = true;
|
searchInstanceRunning = true;
|
||||||
InstanceSocialVM instanceSocialVM = new ViewModelProvider(FragmentLoginMain.this).get(InstanceSocialVM.class);
|
|
||||||
instanceSocialVM.getInstances(query).observe(requireActivity(), instanceSocialList -> {
|
instanceSocialVM.getInstances(query).observe(requireActivity(), instanceSocialList -> {
|
||||||
binding.loginInstance.setAdapter(null);
|
binding.loginInstance.setAdapter(null);
|
||||||
if (instanceSocialList.instances.isEmpty()) {
|
if (instanceSocialList.instances.isEmpty()) {
|
||||||
|
|
Loading…
Reference in New Issue