Search in sources :

Example 1 with UpdateHistoryTask

use of org.wikipedia.history.UpdateHistoryTask in project apps-android-wikipedia by wikimedia.

the class PageFragment method addTimeSpentReading.

private void addTimeSpentReading(int timeSpentSec) {
    if (model.getCurEntry() == null) {
        return;
    }
    model.setCurEntry(new HistoryEntry(model.getCurEntry().getTitle(), new Date(), model.getCurEntry().getSource(), timeSpentSec));
    new UpdateHistoryTask(model.getCurEntry(), app).execute();
}
Also used : UpdateHistoryTask(org.wikipedia.history.UpdateHistoryTask) HistoryEntry(org.wikipedia.history.HistoryEntry) Date(java.util.Date)

Aggregations

Date (java.util.Date)1 HistoryEntry (org.wikipedia.history.HistoryEntry)1 UpdateHistoryTask (org.wikipedia.history.UpdateHistoryTask)1