Fetch comments
Last updated
Was this helpful?
Last updated
Was this helpful?
The plugin fetches the comments associated with the current page and adds them to the UI.
The plugin fetches a data identifier handle for the appendable data associated with the current page.
controller.js
The name of the appendable data is based on the URL of the current page.
controller.js
The actual name of the appendable data is the hash of _getLocation()
.
The plugin fetches an appendable data handle using the data identifier handle previously obtained.
controller.js
The plugin fetches the metadata of the appendable data using the appendable data handle. The length of the appendable data represents the number of comments for the current page.
controller.js
If the data length is 0, it means that the current page doesn't have any comments.
If the data length is greater than 0, the plugin fetches all the comments contained inside the appendable data.
The plugin fetches a data identifier handle from the appendable data based on the current index.
controller.js
The plugin fetches the data map of the comment using the data identifier handle of the current comment.
controller.js
The API returns an immutable data reader handle.
The plugin reads the immutable data representing the comment using the immutable data reader handle.
controller.js
The plugin drops the immutable data reader handle.
controller.js
The plugin fetches a structured data handle using the data identifier handle of the current comment.
controller.js
The plugin fetches the content of the structured data using the structured data handle.
controller.js
The plugin drops the structured data handle of the current comment.
controller.js
The plugin drops the data identifier handle of the current comment.
controller.js
The plugin continues iterating through the appendable data until all the comments it contains have been fetched. The plugin then sorts them by time and adds them to the UI.
The plugin drops the data identifier handle of the appendable data associated with the current page.
controller.js
If the current page is using the , the plugin will expect the comments inside the appendable data to be stored as immutable data.
If the current page is using the , the plugin will expect the comments inside the appendable data to be stored as structured data.