-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#7815 Delayed synchronization #11278
base: master
Are you sure you want to change the base?
#7815 Delayed synchronization #11278
Conversation
# CHANGELOG.md # app/schemas/com.nextcloud.client.database.NextcloudDatabase/66.json # app/src/main/java/com/owncloud/android/ui/preview/PreviewMediaFragment.java # app/src/main/java/com/owncloud/android/ui/preview/PreviewVideoActivity.kt # app/src/main/res/values-b+en+001/strings.xml # app/src/main/res/values-bg-rBG/strings.xml # app/src/main/res/values-cs-rCZ/strings.xml # app/src/main/res/values-da/strings.xml # app/src/main/res/values-de/strings.xml # app/src/main/res/values-es/strings.xml # app/src/main/res/values-fr/strings.xml # app/src/main/res/values-hu-rHU/strings.xml # app/src/main/res/values-pl/strings.xml # app/src/main/res/values-tr/strings.xml # app/src/main/res/values-zh-rCN/strings.xml # app/src/main/res/values-zh-rHK/strings.xml # app/src/main/res/values-zh-rTW/strings.xml # app/src/main/res/values/strings.xml Signed-off-by: batpio <[email protected]>
Signed-off-by: batpio <[email protected]>
Signed-off-by: batpio <[email protected]>
Signed-off-by: batpio <[email protected]>
Signed-off-by: batpio <[email protected]>
Signed-off-by: batpio <[email protected]>
Signed-off-by: batpio <[email protected]>
Signed-off-by: batpio <[email protected]>
Signed-off-by: batpio <[email protected]>
Signed-off-by: batpio <[email protected]>
Signed-off-by: batpio <[email protected]>
Signed-off-by: batpio <[email protected]>
Signed-off-by: batpio <[email protected]>
Signed-off-by: batpio <[email protected]>
Signed-off-by: batpio <[email protected]>
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #11278 +/- ##
============================================
+ Coverage 31.44% 31.52% +0.07%
- Complexity 3413 3427 +14
============================================
Files 575 577 +2
Lines 42018 42146 +128
Branches 5660 5664 +4
============================================
+ Hits 13214 13286 +72
- Misses 26861 26905 +44
- Partials 1943 1955 +12
|
Signed-off-by: batpio <[email protected]>
Signed-off-by: batpio <[email protected]>
Signed-off-by: batpio <[email protected]>
Signed-off-by: batpio <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't tested this yet, especially to see how this will behave with existing autoupload folders. This can't be tested without adressing my first comment below, however.
Having said that, this looks quite promising! Thanks for contributing @BatPio
app/schemas/com.nextcloud.client.database.NextcloudDatabase/68.json
Outdated
Show resolved
Hide resolved
app/src/androidTest/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragmentIT.kt
Show resolved
Hide resolved
app/src/androidTest/java/com/owncloud/android/utils/TimeUtilsTest.kt
Outdated
Show resolved
Hide resolved
@alperozturk96 After setting the auto upload delay for a directory, you need to add a new file to that directory and wait. After the delay time has elapsed, the file should appear on the server. It is important to check that the file has not appeared on the server before the delay time has elapsed. Due to the Android's sync interval, the delay may increase by an additional 15 minutes. I tested this with screenshots. Unfortunately, I have no idea how to test this without waiting. |
…ified-master-v2 # Conflicts: # app/schemas/com.nextcloud.client.database.NextcloudDatabase/86.json # app/src/main/java/com/nextcloud/client/database/NextcloudDatabase.kt # app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt
…tion-simplified-master-v2' into feature/7815/delayed-synchronization-simplified-master-v2
Signed-off-by: batpio <[email protected]>
I have adapted my code to the current solution with FilesystemDataProvider. MR is ready for testing |
I tested auto upload seems like okay. Could you please review, especially |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for taking the time to contribute these enhancements and for maintaining this pull request.
In general this seems to work. The duration selector dialogue is very intuitive. Great work!
The phrase Delay file upload suggests that the upload of a given file is delayed. However, we're only looking for files older than the specified time. This becomes an issue when there are files already present or when files are moved to the auto upload folder. These files will most likely be uploaded immediately. To address this issue, I would suggest to rename the feature to something like Exclude recent files or Minimum file age.
I think that we should involve @Hyeyoung346 in this discussion.
app/src/main/java/com/owncloud/android/datamodel/FilesystemDataProvider.java
Outdated
Show resolved
Hide resolved
app/src/main/res/values/strings.xml
Outdated
<string name="common_clear">Clear</string> | ||
<string name="common_days_short">d</string> | ||
<string name="common_hours_short">h</string> | ||
<string name="common_minutes_short">m</string> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<string name="common_minutes_short">m</string> | |
<string name="common_minutes_short">min</string> |
To my knowledge min is the standard abbreviation.
app/src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.kt
Outdated
Show resolved
Hide resolved
<TextView | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="42dp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure that this value will work using different font sizes and faces. I've also noticed that the clear button (⊗) disappears on smaller screen sizes.
app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/owncloud/android/ui/dialog/DurationPickerDialogFragment.kt
Outdated
Show resolved
Hide resolved
…rDialogFragment.kt Co-authored-by: Tom <[email protected]> Signed-off-by: BatPio <[email protected]>
…rDialogFragment.kt Co-authored-by: Tom <[email protected]> Signed-off-by: BatPio <[email protected]>
Co-authored-by: Tom <[email protected]> Signed-off-by: BatPio <[email protected]>
Co-authored-by: Tom <[email protected]> Signed-off-by: BatPio <[email protected]>
Co-authored-by: Tom <[email protected]> Signed-off-by: BatPio <[email protected]>
…aProvider.java Co-authored-by: Tom <[email protected]> Signed-off-by: BatPio <[email protected]>
Signed-off-by: batpio <[email protected]>
Signed-off-by: batpio <[email protected]>
Signed-off-by: batpio <[email protected]>
Signed-off-by: batpio <[email protected]>
Signed-off-by: batpio <[email protected]>
Signed-off-by: batpio <[email protected]>
…ified-master-v2 # Conflicts: # app/schemas/com.nextcloud.client.database.NextcloudDatabase/87.json # app/src/main/java/com/nextcloud/client/database/NextcloudDatabase.kt
Signed-off-by: batpio <[email protected]>
Signed-off-by: batpio <[email protected]>
Signed-off-by: batpio <[email protected]>
Fixes #7815
Fixes #2323
Some tests are written. I'm waiting for suggestions on what else can be tested.
Delay configuration: