mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-26 14:21:16 +00:00
Fix NPE during addDeviceViewAndSetListener#deviceView.setChecked (#1153)
This commit is contained in:
parent
9ecc9d79d8
commit
73e32ce5d0
1 changed files with 1 additions and 0 deletions
|
@ -480,6 +480,7 @@ public class FolderActivity extends SyncthingActivity
|
|||
private void addDeviceViewAndSetListener(Device device, LayoutInflater inflater) {
|
||||
inflater.inflate(R.layout.item_device_form, mDevicesContainer);
|
||||
SwitchCompat deviceView = (SwitchCompat) mDevicesContainer.getChildAt(mDevicesContainer.getChildCount()-1);
|
||||
deviceView.setOnCheckedChangeListener(null);
|
||||
deviceView.setChecked(mFolder.getDevice(device.deviceID) != null);
|
||||
deviceView.setText(device.getDisplayName());
|
||||
deviceView.setTag(device);
|
||||
|
|
Loading…
Reference in a new issue