1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-12-23 11:21:29 +00:00

Fixed comparison type.

This commit is contained in:
Felix Ableitner 2016-02-25 14:04:57 +01:00
parent 04043a1174
commit 192188fd4e

View file

@ -129,7 +129,7 @@ public class DeviceFragment extends Fragment implements
private TextWatcher mAddressesTextWatcher = new TextWatcherAdapter() {
@Override
public void afterTextChanged(Editable s) {
if (!s.toString().equals(mDevice.addresses)) {
if (!s.toString().equals(displayableAddresses())) {
mDeviceNeedsToUpdate = true;
mDevice.addresses = persistableAddresses(s);
@ -289,7 +289,7 @@ public class DeviceFragment extends Fragment implements
// Update views
mIdView.setText(mDevice.deviceID);
mNameView.setText((mDevice.name));
mAddressesView.setText(TextUtils.join(" ", displayableAddresses()));
mAddressesView.setText(displayableAddresses());
mCompressionValueView.setText(Compression.fromValue(getActivity(), mDevice.compression).getTitle(getActivity()));
mIntroducerView.setChecked(mDevice.introducer);
@ -406,10 +406,11 @@ public class DeviceFragment extends Fragment implements
: Arrays.asList(userInput.toString().split(" "));
}
private List<String> displayableAddresses() {
return DYNAMIC_ADDRESS.equals(mDevice.addresses)
private String displayableAddresses() {
List<String> list = DYNAMIC_ADDRESS.equals(mDevice.addresses)
? DYNAMIC_ADDRESS
: mDevice.addresses;
return TextUtils.join(" ", list);
}
@Override