[Home] Add marking everything as read in the home fragment

This commit is contained in:
Kacper Ziubryniewicz
2019-10-11 23:38:40 +02:00
parent 7eaa4caae2
commit ea36e8e9bd
3 changed files with 11 additions and 1 deletions

View File

@ -255,7 +255,15 @@ public class HomeFragment extends Fragment {
activity.getBottomSheet().close();
setNumberDialog();
}),
new BottomSheetSeparatorItem(true)
new BottomSheetSeparatorItem(true),
new BottomSheetPrimaryItem(true)
.withTitle(R.string.menu_mark_everything_as_read)
.withIcon(CommunityMaterial.Icon.cmd_eye_check)
.withOnClickListener(v3 -> {
activity.getBottomSheet().close();
AsyncTask.execute(() -> app.db.metadataDao().setAllSeen(App.profileId, true));
Toast.makeText(activity, R.string.main_menu_mark_as_read_success, Toast.LENGTH_SHORT).show();
})
);
activity.gainAttention();
}