1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-11-28 07:11:17 +00:00
Commit graph

2 commits

Author SHA1 Message Date
7e37c14a82 Various lint fixes 2017-09-04 13:43:27 +09:00
Jessie Chatham Spencer
0c1abb3c9c Added support for all versioning types in the app UI. Addressing #718 (#896)
* Merge branch 'Fix718'
Merged fixes for issues #718, added functionality for all the file versioning types in the app UI.

* Basic theme is working

* GOt dialog working with setREsult.

* Addressed issues raised and fixed orientation change bug.
Adressed issues radied by nutomic:
- Changed the String concatenation so it uses String.format.
- Made members variables private that were not previously private by mistake.
- Changed name from FolderPathTextView to FolderPathTextViewFragment.
- Fixed typo in NumberPickerFragment
- Now uses TImeUnit for time conversion
- Changed from DialogFragment to a dialog themed Activity inorder to have correct themeing.

About the orientation change bug. When the dialog themed activity was open and the orientation was changed, it would cause the background activity(The FolderActivity) to
recreate itself. In the process of recreating itself it would reset the mFolder variable and then reinitialise it in the OnApiChange listener. However the result from the
Dialog was returned before the mFolder had been reinitialised and was still null, so inbetween the result being returned and the mFolder variable being reinitialised the new file versioning
configuration had to be stored and then applied to the mFolder variable in the onApiChange listener. The file versioning configuration is temporarily stored in the mVersioning variable which is
an instance of Folder.versioning.
This error only occurred when using an Activity as a dialog and using the startActivityForResult method for initialisling the activity. Before when using a dialogfragment and an interface to callback to
the parent activity, everything happend in the correct order.

* Fixed versioning dialog lag.
The initial updateFragmentView() is called in onCreate() and the
fragment is only updated when a new file versioning type is selected.

* Removed FolderPathTextViewFragment
The fragment is removed, and a helper method has been added to FolderPickerActivity to create an intent
to the the FolderPickerActivity for result.
2017-06-15 17:44:44 +09:00