Refactor register sync root#189
Conversation
| #include <Windows.h> | ||
| #include "register_sync_root.h" | ||
|
|
||
| napi_value register_sync_root_wrapper(napi_env env, napi_callback_info args) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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.
No description provided.