diff --git a/app/src/main/java/org/itxtech/daedalus/fragment/DnsServerConfigFragment.java b/app/src/main/java/org/itxtech/daedalus/fragment/DnsServerConfigFragment.java index 3cdaf3a..541b87d 100644 --- a/app/src/main/java/org/itxtech/daedalus/fragment/DnsServerConfigFragment.java +++ b/app/src/main/java/org/itxtech/daedalus/fragment/DnsServerConfigFragment.java @@ -108,11 +108,10 @@ public class DnsServerConfigFragment extends PreferenceFragment implements Toolb Integer.parseInt(((EditTextPreference) findPreference("serverPort")).getText()) )); } else { - Daedalus.configurations.getCustomDnsServers().set(index, new CustomDnsServer( - ((EditTextPreference) findPreference("serverName")).getText(), - ((EditTextPreference) findPreference("serverAddress")).getText(), - Integer.parseInt(((EditTextPreference) findPreference("serverPort")).getText()) - )); + CustomDnsServer server = Daedalus.configurations.getCustomDnsServers().get(index); + server.setName(((EditTextPreference) findPreference("serverName")).getText()); + server.setAddress(((EditTextPreference) findPreference("serverAddress")).getText()); + server.setPort(Integer.parseInt(((EditTextPreference) findPreference("serverPort")).getText())); } getActivity().finish(); break; diff --git a/app/src/main/res/xml/shortcuts.xml b/app/src/main/res/xml/shortcuts.xml index 0e7be50..e6459f6 100644 --- a/app/src/main/res/xml/shortcuts.xml +++ b/app/src/main/res/xml/shortcuts.xml @@ -2,7 +2,7 @@