Hi @baris,
I see that you closed the issue for nodebb-plugin-recent-cards. I'm now trying to adopt your changes for nodebb-widget-essentials recent topics widget. If I compare the code of library.js it's bit different though.
I assume that I can use topics.getSortedTopics instead of topics.getTopicsFromSet like you do for nodebb-plugin-recent-cards but I'm not sure how to handle the 'key' value that has been initialized before. My idea is something like this:
const data = await topics.getSortedTopics({
uid: widget.uid,
start: 0,
stop: numTopics,
sort: widget.data.sort
});
In recent-cards this call was used before:
topicsData = await getTopicsFromSet(map[widget.data.sort], 0, 19);
In widget-essentials this call is used:
const data = await topics.getTopicsFromSet(key, widget.uid, 0, Math.max(0, numTopics));
Help will be appreciated.
best regards
dave