Search in sources :

Example 1 with GetHoverCardRemoteOperation

use of com.nextcloud.android.lib.resources.profile.GetHoverCardRemoteOperation in project android by nextcloud.

the class RetrieveHoverCardAsyncTask method doInBackground.

@Override
protected HoverCard doInBackground(Void... voids) {
    try {
        NextcloudClient client = clientFactory.createNextcloudClient(user);
        RemoteOperationResult<HoverCard> result = new GetHoverCardRemoteOperation(userId).execute(client);
        if (result.isSuccess()) {
            return result.getResultData();
        } else {
            return null;
        }
    } catch (ClientFactory.CreationException | NullPointerException e) {
        return null;
    }
}
Also used : GetHoverCardRemoteOperation(com.nextcloud.android.lib.resources.profile.GetHoverCardRemoteOperation) NextcloudClient(com.nextcloud.common.NextcloudClient) HoverCard(com.nextcloud.android.lib.resources.profile.HoverCard)

Aggregations

GetHoverCardRemoteOperation (com.nextcloud.android.lib.resources.profile.GetHoverCardRemoteOperation)1 HoverCard (com.nextcloud.android.lib.resources.profile.HoverCard)1 NextcloudClient (com.nextcloud.common.NextcloudClient)1