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

Fixed device toggle (fixes #647).

This commit is contained in:
Felix Ableitner 2016-05-19 11:40:55 +09:00
parent 08c546a93b
commit 573533a35f
2 changed files with 2 additions and 1 deletions

View file

@ -99,7 +99,7 @@ public class FolderFragment extends Fragment
mFolder.readOnly = isChecked; mFolder.readOnly = isChecked;
mFolderNeedsToUpdate = true; mFolderNeedsToUpdate = true;
break; break;
case R.id.share_device_id: case R.id.device_toggle:
RestApi.Device device = (RestApi.Device) view.getTag(); RestApi.Device device = (RestApi.Device) view.getTag();
if (isChecked) { if (isChecked) {
mFolder.deviceIds.add(device.deviceID); mFolder.deviceIds.add(device.deviceID);

View file

@ -2,6 +2,7 @@
<android.support.v7.widget.SwitchCompat xmlns:android="http://schemas.android.com/apk/res/android" <android.support.v7.widget.SwitchCompat xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
style="@style/Widget.Syncthing.TextView.Label.Details.DeviceList" style="@style/Widget.Syncthing.TextView.Label.Details.DeviceList"
android:id="@+id/device_toggle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/material_divider_inset" android:layout_marginLeft="@dimen/material_divider_inset"