Commit graph

19888 commits

Author SHA1 Message Date
Claudio Cambra
a7fcb846ab
Extract folder now big activity generation into separate method
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:44:22 +08:00
Claudio Cambra
cbad4347bd
Extract notifying of existing folder now big to separate static method
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:44:22 +08:00
Claudio Cambra
e1f342c320
Declare whitelist and blacklist activity verbs as static constexprs in activitydata, refer to this in usage
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:44:22 +08:00
Claudio Cambra
5db79261f6
Fix breakages in testactivitylistmodel caused by recent activitylistmodel changes
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:44:22 +08:00
Claudio Cambra
e987fe88c5
Fix generation of context menu activity links
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:44:22 +08:00
Claudio Cambra
9b5391bdc1
Ensure generated activity buttons are within count set by maxActionButtons
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:44:22 +08:00
Claudio Cambra
af45017e94
Do not clear the whitelist on sync success
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:44:22 +08:00
Claudio Cambra
449bac837b
Do not always re-notify user on existing folder now big if this folder already black or white listed
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:44:22 +08:00
Claudio Cambra
2324a60c76
Stop current sync when existing folder becomes big and we have enabled disabling sync of folders that become big
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:44:22 +08:00
Claudio Cambra
bd7ccf5738
Add UI element in general settings to stop syncing existing folders that have now overcome limit
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:44:21 +08:00
Claudio Cambra
1342f81cab
Add config option to stop synchronising existing folders when they grow beyond size
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:44:15 +08:00
Claudio Cambra
0b13be663b
Add test for correct reporting of existing folder overcoming size limit
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:42:35 +08:00
Claudio Cambra
4cdf525df2
Report size for directories in syncenginetestutils propfind response
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:43 +08:00
Claudio Cambra
21656cce17
Replace all manual isntancesof adding trailing slash with use of utility method
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:42 +08:00
Claudio Cambra
3b208bf838
Move trailingSlashPath convenience function into Utility class
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:42 +08:00
Claudio Cambra
ac8e9c4274
Fix trailing slash procedure in DiscoveryPhase::checkSelectiveSyncNewFolder
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:42 +08:00
Claudio Cambra
9fa5ae3604
Use simpler sort methods for white and black lists in discoveryphase
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:42 +08:00
Claudio Cambra
82f6fd5c27
Remove use of old foreach in SyncJournalDb::setSelectiveSyncList
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:42 +08:00
Claudio Cambra
1b73011f59
Constify SyncJournalDb::findPathInSelectiveSyncList
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:41 +08:00
Claudio Cambra
74c4ec88a2
Const autofy variables in ProcessDirectoryJob::processFile
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:41 +08:00
Claudio Cambra
a93279bcbf
Default to adding existing now big folders to whitelist when undecided
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:41 +08:00
Claudio Cambra
6682b3ade4
Ensure folder whitelist and blacklist helper methods remove path from other lists
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:41 +08:00
Claudio Cambra
f9bde98aad
Prevent possible accountsettings crash by sorting blacklist before checking
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:41 +08:00
Claudio Cambra
e2535d6ce8
Prevent double notification of folder now big in activities
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:41 +08:00
Claudio Cambra
5f250a5dad
Ensure newly whitelisted or blacklisted paths are removed from undecided list
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:41 +08:00
Claudio Cambra
7d1fa16a3f
Add activity for existing folder going over set limit
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:40 +08:00
Claudio Cambra
c975d40fb8
Do not create dismiss links for notifications as these are not used anyway
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:40 +08:00
Claudio Cambra
12931069c0
Create more than one converted activity link, therby respecting maxactionbuttons
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:40 +08:00
Claudio Cambra
fe59d4ec79
Ensure whitelist/blacklist procedure removes activity
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:40 +08:00
Claudio Cambra
e985367b5e
Add method to add notification activity in activity list in User
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:40 +08:00
Claudio Cambra
10989fa810
Add method to get user pointer in UserModel by AccountState pointer
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:39 +08:00
Claudio Cambra
29cc9c06f9
Handle WHITELIST_FOLDER and BLACKLIST_FOLDER verbs in activitylistmodel
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:39 +08:00
Claudio Cambra
7e17e9226b
Add convenience methods to folderman so that classes can add and remove paths from folders without needing to know which folder the path belongs to
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:39 +08:00
Claudio Cambra
2bcefd6105
Add methods to Folder so that other classes can easily add folder paths to white/blacklists
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:39 +08:00
Claudio Cambra
993ee6cb5b
Remove redundant "optional" gui log functions which relly just call gui log under the hood
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:39 +08:00
Claudio Cambra
e05cf7665a
Add specific message for existing folders exceeding warning limit in accountsettings
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:39 +08:00
Claudio Cambra
017dca2328
Move findPathInList from discoveryphase to common syncjournaldb
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:39 +08:00
Claudio Cambra
a97bdb95ee
Clean up AccountSettings::refreshSelectiveSyncStatus
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:38 +08:00
Claudio Cambra
2a4ba398e2
Do not notify about folders growing beyond threshold by default
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:38 +08:00
Claudio Cambra
83b69032ff
Ensure notify big folders checkbox state is changed when parent checkbox changes
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:38 +08:00
Claudio Cambra
61057334f6
Do not notify if setting is not enabled for folders going over limit
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:38 +08:00
Claudio Cambra
e6f5fb6382
Hook up existing folder notification size checkbox in general settings
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:37 +08:00
Claudio Cambra
b06cbf4dce
Add config settings for notifying existing folders going over limit
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:37 +08:00
Claudio Cambra
e8b82115e2
Add a checkbox in UI to obey folder size limit for existing folders
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:37 +08:00
Claudio Cambra
aa20c102b6
Properly check folder size on server
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:37 +08:00
Claudio Cambra
5acacdd4d8
Make checkFolderSizeLimit more task agnostic
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:37 +08:00
Claudio Cambra
6f2e63d52f
Create and connect specific signal for existing folder now being discovered to be big
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:37 +08:00
Claudio Cambra
10dd03f50a
Add slot for existing folders becoming big in Folder
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:36 +08:00
Claudio Cambra
ac218b000e
Use single convenience method to handle trailing slash in paths for Folder
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:36 +08:00
Claudio Cambra
5844b2763d
Check selective sync state directories that have been updated and now have differing size
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:40:36 +08:00