fetchGroupById
Fetches a group by its unique ID.
Retrieves the details of a specific group identified by the given groupId
and passes the result to the provided listener. The Group object returned contains all relevant information about the group, including its members, name, and other properties.
If the groupId
is null or empty, the method returns immediately, and the listener's onError
method is triggered with an appropriate error message, indicating that the operation could not proceed.
The fetched group is added to the groups property if it does not already exist. If the group already exists in the groups property, its information is updated with the newly fetched data.
This method is useful when you need to retrieve details of a specific group, such as when navigating directly to a group's details or performing actions based on a group's information.
Parameters
The unique identifier of the group to fetch. If null or empty, the method returns immediately, and the listener's onError
method is called.
An optional RainbowListener that will be notified with the result of the fetch operation. The listener receives a Group object as its result or an error through the onError
method if the groupId
is invalid.