Can now mark as read / unread

This commit is contained in:
NoodleMage 2016-02-18 17:40:12 +01:00
parent aac6b242a0
commit ba0f3778ce
3 changed files with 7 additions and 6 deletions

View File

@ -140,5 +140,10 @@ public class RecentChaptersFragment extends BaseRxFragment<RecentChaptersPresent
return true; return true;
} }
protected boolean onMarkAsUnread(Observable<Chapter> chapters) {
getPresenter().markChaptersRead(chapters, false);
return true;
}
} }

View File

@ -15,7 +15,6 @@ import eu.kanade.tachiyomi.data.database.models.Chapter;
import eu.kanade.tachiyomi.data.database.models.MangaChapter; import eu.kanade.tachiyomi.data.database.models.MangaChapter;
import eu.kanade.tachiyomi.data.download.model.Download; import eu.kanade.tachiyomi.data.download.model.Download;
import eu.kanade.tachiyomi.ui.base.adapter.FlexibleViewHolder; import eu.kanade.tachiyomi.ui.base.adapter.FlexibleViewHolder;
import eu.kanade.tachiyomi.util.ToastUtil;
import rx.Observable; import rx.Observable;
public class RecentChaptersHolder extends FlexibleViewHolder { public class RecentChaptersHolder extends FlexibleViewHolder {
@ -167,12 +166,9 @@ public class RecentChaptersHolder extends FlexibleViewHolder {
case R.id.action_delete: case R.id.action_delete:
return adapter.getFragment().onDelete(chapterObservable, mangaChapter.manga); return adapter.getFragment().onDelete(chapterObservable, mangaChapter.manga);
case R.id.action_mark_as_read: case R.id.action_mark_as_read:
ToastUtil.showShort(context, "Mark as read");
return adapter.getFragment().onMarkAsRead(chapterObservable); return adapter.getFragment().onMarkAsRead(chapterObservable);
case R.id.action_mark_as_unread: case R.id.action_mark_as_unread:
ToastUtil.showShort(context, "Mark as unread does not work, yet...."); return adapter.getFragment().onMarkAsUnread(chapterObservable);
return true;
// return adapter.getFragment().onMarkAsUnread(chapterObservable);
} }
return false; return false;
}); });

View File

@ -6,7 +6,7 @@ buildscript {
jcenter() jcenter()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:2.0.0-beta4' classpath 'com.android.tools.build:gradle:2.0.0-beta2'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath 'me.tatarka:gradle-retrolambda:3.2.4' classpath 'me.tatarka:gradle-retrolambda:3.2.4'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.12.0' classpath 'com.github.ben-manes:gradle-versions-plugin:0.12.0'