1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-11-30 00:01:19 +00:00

Fixed wrong devices being checked for a node (fixes #89).

Also, don't show the local device in device selection.
This commit is contained in:
Felix Ableitner 2014-11-12 23:09:07 +02:00
parent 65199cbe23
commit e131849171
2 changed files with 2 additions and 2 deletions

View file

@ -151,6 +151,8 @@ public class FolderSettingsFragment extends PreferenceFragment
List<RestApi.Device> devicesList = mSyncthingService.getApi().getDevices();
for (RestApi.Device n : devicesList) {
ExtendedCheckBoxPreference cbp = new ExtendedCheckBoxPreference(getActivity(), n);
// Calling addPreference later causes it to change the checked state.
mDevices.addPreference(cbp);
cbp.setTitle(n.Name);
cbp.setKey(KEY_NODE_SHARED);
cbp.setOnPreferenceChangeListener(FolderSettingsFragment.this);
@ -160,7 +162,6 @@ public class FolderSettingsFragment extends PreferenceFragment
cbp.setChecked(true);
}
}
mDevices.addPreference(cbp);
}
mVersioning.setChecked(mFolder.Versioning instanceof RestApi.SimpleVersioning);
if (mVersioning.isChecked()) {

View file

@ -482,7 +482,6 @@ public class RestApi implements SyncthingService.OnWebGuiAvailableListener,
JSONObject n = devices.getJSONObject(j);
r.DeviceIds.add(n.getString("DeviceID"));
}
r.DeviceIds.add(mLocalDeviceId);
r.ReadOnly = json.getBoolean("ReadOnly");
r.RescanIntervalS = json.getInt("RescanIntervalS");