Merge pull request #13081 from nextcloud/improvement/show-snackbar-message-instead-throwing-exception

Show Snackbar Message Instead Throwing Exception For Sync Folder Operations
This commit is contained in:
Alper Öztürk 2024-06-07 13:37:23 +02:00 committed by GitHub
commit 009bb25b22
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View file

@ -804,7 +804,8 @@ public class ReceiveExternalFilesActivity extends FileActivity
private void startSyncFolderOperation(OCFile folder) {
if (folder == null) {
throw new IllegalArgumentException("Folder must not be null");
DisplayUtils.showSnackMessage(this, R.string.receive_external_files_activity_start_sync_folder_is_not_exists_message);
return;
}
long currentSyncTime = System.currentTimeMillis();

View file

@ -448,6 +448,8 @@
<string name="clipboard_unexpected_error">Unexpected error while copying to clipboard</string>
<string name="clipboard_label">Text copied from %1$s</string>
<string name="receive_external_files_activity_start_sync_folder_is_not_exists_message">Folder cannot be found, sync operation is cancelled</string>
<string name="error_cant_bind_to_operations_service">Critical error: Unable to perform operations</string>
<string name="network_error_socket_exception">An error occurred during connection to the server</string>