Skip to content

Comments

Refactor register sync root#189

Merged
dajimenezriv-internxt merged 16 commits intomasterfrom
refactor-register-sync-root
Sep 17, 2025
Merged

Refactor register sync root#189
dajimenezriv-internxt merged 16 commits intomasterfrom
refactor-register-sync-root

Conversation

@dajimenezriv-internxt
Copy link
Contributor

No description provided.

@dajimenezriv-internxt dajimenezriv-internxt self-assigned this Sep 15, 2025
Base automatically changed from hydrate-file-thread-safe to master September 15, 2025 16:31
#include <Windows.h>
#include "register_sync_root.h"

napi_value register_sync_root_wrapper(napi_env env, napi_callback_info args)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function just obtains all args taking into account memory leaks.

#include <iostream>
#include <vector>

void register_sync_root(const wchar_t *syncRootPath, const wchar_t *providerName, const wchar_t *providerVersion, const wchar_t *providerId, const wchar_t *logoPath)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code is the same as before, but now we have removed the check that providerId is a GUID since we already sending it in that from from javascript.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We set the provider id, the root folder path "C:\Users\user\InternxtDrive - uuid", display name, icon, the recycle bin link and a context to filter later these sync roots.

#include <Windows.h>
#include "Placeholders.h"

napi_value convert_to_placeholder_impl(napi_env env, napi_callback_info args)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exact same code

winrt::IVector<winrt::StorageProviderItemPropertyDefinition> customStates = info.StorageProviderItemPropertyDefinitions();
AddCustomState(customStates, L"CustomStateName1", 1);
AddCustomState(customStates, L"CustomStateName2", 2);
AddCustomState(customStates, L"CustomStateName3", 3);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was used inside the register, and technically is for defining custom columns for the placeholders. However, nothing appeared in the file explorer and base on the names "CustomStateX" and a fixed value, it seems it was something to test.

@dajimenezriv-internxt dajimenezriv-internxt merged commit d8d3f77 into master Sep 17, 2025
1 check passed
@dajimenezriv-internxt dajimenezriv-internxt deleted the refactor-register-sync-root branch September 17, 2025 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants