Search in sources :

Example 1 with FetchClaimsListener

use of com.odysee.app.listener.FetchClaimsListener in project odysee-android by OdyseeTeam.

the class MainActivity method fetchOwnClaims.

public void fetchOwnClaims() {
    ClaimListTask task = new ClaimListTask(Arrays.asList(Claim.TYPE_STREAM, Claim.TYPE_REPOST), null, new ClaimListResultHandler() {

        @Override
        public void onSuccess(List<Claim> claims) {
            Lbry.ownClaims = Helper.filterDeletedClaims(new ArrayList<>(claims));
            for (FetchClaimsListener listener : fetchClaimsListeners) {
                listener.onClaimsFetched(claims);
            }
        }

        @Override
        public void onError(Exception error) {
        }
    });
    task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
}
Also used : ClaimListResultHandler(com.odysee.app.tasks.claim.ClaimListResultHandler) FetchClaimsListener(com.odysee.app.listener.FetchClaimsListener) ClaimListTask(com.odysee.app.tasks.claim.ClaimListTask) Claim(com.odysee.app.model.Claim) JSONException(org.json.JSONException) LbryUriException(com.odysee.app.exceptions.LbryUriException) ExecutionException(java.util.concurrent.ExecutionException) SQLiteException(android.database.sqlite.SQLiteException) LbryioRequestException(com.odysee.app.exceptions.LbryioRequestException) LbryioResponseException(com.odysee.app.exceptions.LbryioResponseException) ApiCallException(com.odysee.app.exceptions.ApiCallException) AuthTokenInvalidatedException(com.odysee.app.exceptions.AuthTokenInvalidatedException) ParseException(java.text.ParseException)

Aggregations

SQLiteException (android.database.sqlite.SQLiteException)1 ApiCallException (com.odysee.app.exceptions.ApiCallException)1 AuthTokenInvalidatedException (com.odysee.app.exceptions.AuthTokenInvalidatedException)1 LbryUriException (com.odysee.app.exceptions.LbryUriException)1 LbryioRequestException (com.odysee.app.exceptions.LbryioRequestException)1 LbryioResponseException (com.odysee.app.exceptions.LbryioResponseException)1 FetchClaimsListener (com.odysee.app.listener.FetchClaimsListener)1 Claim (com.odysee.app.model.Claim)1 ClaimListResultHandler (com.odysee.app.tasks.claim.ClaimListResultHandler)1 ClaimListTask (com.odysee.app.tasks.claim.ClaimListTask)1 ParseException (java.text.ParseException)1 ExecutionException (java.util.concurrent.ExecutionException)1 JSONException (org.json.JSONException)1