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:
parent
04043a1174
commit
192188fd4e
1 changed files with 5 additions and 4 deletions
|
@ -129,7 +129,7 @@ public class DeviceFragment extends Fragment implements
|
||||||
private TextWatcher mAddressesTextWatcher = new TextWatcherAdapter() {
|
private TextWatcher mAddressesTextWatcher = new TextWatcherAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void afterTextChanged(Editable s) {
|
public void afterTextChanged(Editable s) {
|
||||||
if (!s.toString().equals(mDevice.addresses)) {
|
if (!s.toString().equals(displayableAddresses())) {
|
||||||
mDeviceNeedsToUpdate = true;
|
mDeviceNeedsToUpdate = true;
|
||||||
|
|
||||||
mDevice.addresses = persistableAddresses(s);
|
mDevice.addresses = persistableAddresses(s);
|
||||||
|
@ -289,7 +289,7 @@ public class DeviceFragment extends Fragment implements
|
||||||
// Update views
|
// Update views
|
||||||
mIdView.setText(mDevice.deviceID);
|
mIdView.setText(mDevice.deviceID);
|
||||||
mNameView.setText((mDevice.name));
|
mNameView.setText((mDevice.name));
|
||||||
mAddressesView.setText(TextUtils.join(" ", displayableAddresses()));
|
mAddressesView.setText(displayableAddresses());
|
||||||
mCompressionValueView.setText(Compression.fromValue(getActivity(), mDevice.compression).getTitle(getActivity()));
|
mCompressionValueView.setText(Compression.fromValue(getActivity(), mDevice.compression).getTitle(getActivity()));
|
||||||
mIntroducerView.setChecked(mDevice.introducer);
|
mIntroducerView.setChecked(mDevice.introducer);
|
||||||
|
|
||||||
|
@ -406,10 +406,11 @@ public class DeviceFragment extends Fragment implements
|
||||||
: Arrays.asList(userInput.toString().split(" "));
|
: Arrays.asList(userInput.toString().split(" "));
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<String> displayableAddresses() {
|
private String displayableAddresses() {
|
||||||
return DYNAMIC_ADDRESS.equals(mDevice.addresses)
|
List<String> list = DYNAMIC_ADDRESS.equals(mDevice.addresses)
|
||||||
? DYNAMIC_ADDRESS
|
? DYNAMIC_ADDRESS
|
||||||
: mDevice.addresses;
|
: mDevice.addresses;
|
||||||
|
return TextUtils.join(" ", list);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue