Search in sources :

Example 1 with SaveUrlHistoryTask

use of com.odysee.app.tasks.localdata.SaveUrlHistoryTask in project odysee-android by OdyseeTeam.

the class Helper method saveUrlHistory.

public static void saveUrlHistory(String url, String title, int type) {
    DatabaseHelper dbHelper = DatabaseHelper.getInstance();
    if (dbHelper != null) {
        UrlSuggestion suggestion = new UrlSuggestion();
        suggestion.setUri(LbryUri.tryParse(url));
        suggestion.setType(type);
        suggestion.setText(Helper.isNull(title) ? "" : title);
        new SaveUrlHistoryTask(suggestion, dbHelper, null).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
    }
}
Also used : DatabaseHelper(com.odysee.app.data.DatabaseHelper) SaveUrlHistoryTask(com.odysee.app.tasks.localdata.SaveUrlHistoryTask) UrlSuggestion(com.odysee.app.model.UrlSuggestion)

Aggregations

DatabaseHelper (com.odysee.app.data.DatabaseHelper)1 UrlSuggestion (com.odysee.app.model.UrlSuggestion)1 SaveUrlHistoryTask (com.odysee.app.tasks.localdata.SaveUrlHistoryTask)1