Question
SDK - Collection are not updated in the application view
Hi,
I'm experiencing an issue since the LR version 11.0 update where the SDK commands concerning collections are not taking effect on the application view. For example, if I'm trying to run the following code:
local LrTasks = import 'LrTasks'
local LrApplication = import 'LrApplication'
LrTasks.startAsyncTask( function ()
local catalog = LrApplication.activeCatalog()
local message = catalog:withWriteAccessDo("Managing collections", function ()
local collectionSet = catalog:createCollectionSet("Test set", nil, true)
local collection1 = catalog:createCollection("Test collection1", collectionSet, true)
collection1:addPhotos(catalog:getAllPhotos())
local collection2 = catalog:createCollection("Test collection2", collectionSet, true)
collection2:addPhotos(catalog:getAllPhotos())
end)
end)
The collections in App view may sometime not be updated. Sometime it is only partially updated (not all images appear in the collection). I know from the output in the code that the commands were executed successfully. Moreover, if I'm restarting LR, the collections are indeed updated.
*I'm running on macOS and, as I understand, this issue does not occur on Windows.
Are you familiar with the issue? Is there anything else I should add to the code?
App version - LrC 11.1
OS - macOS 11.6.2