mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-26 06:11:19 +00:00
Initialize mFolder.type to FOLDER_TYPE_SEND_RECEIVE
according to the switch element having android:checked=false by default in the xml layout.
This commit is contained in:
parent
9382685fc9
commit
aad57de03d
1 changed files with 3 additions and 11 deletions
|
@ -436,17 +436,8 @@ public class FolderActivity extends SyncthingActivity
|
|||
return true;
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP &&
|
||||
mFolderUri != null) {
|
||||
if (mFolder == null) {
|
||||
Log.e(TAG, "mFolder == null");
|
||||
}
|
||||
if (mFolder.type == null) {
|
||||
Log.e(TAG, "mFolder.type == null");
|
||||
}
|
||||
if (mFolder.type.equals(Constants.FOLDER_TYPE_SEND_ONLY)) {
|
||||
Log.e(TAG, "mFolder.type == Constants.FOLDER_TYPE_SEND_ONLY");
|
||||
}
|
||||
|
||||
mFolderUri != null &&
|
||||
mFolder.type.equals(Constants.FOLDER_TYPE_SEND_ONLY)) {
|
||||
/**
|
||||
* Normally, syncthing takes care of creating the ".stfolder" marker.
|
||||
* This fails on newer android versions if the syncthing binary only has
|
||||
|
@ -595,6 +586,7 @@ public class FolderActivity extends SyncthingActivity
|
|||
*/
|
||||
mFolder.rescanIntervalS = 3600;
|
||||
mFolder.paused = false;
|
||||
mFolder.type = Constants.FOLDER_TYPE_SEND_RECEIVE;
|
||||
mFolder.versioning = new Folder.Versioning();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue