mirror of
https://github.com/AntennaPod/AntennaPod.git
synced 2025-01-20 21:01:17 +01:00
Merge pull request #1968 from mfietz/issue/1929-new-episodes-marked-as
New episodes: Mark (all) as seen
This commit is contained in:
commit
89a1851f57
@ -180,7 +180,7 @@ public class AllEpisodesFragment extends Fragment {
|
||||
}
|
||||
super.onCreateOptionsMenu(menu, inflater);
|
||||
if (itemsLoaded) {
|
||||
inflater.inflate(R.menu.new_episodes, menu);
|
||||
inflater.inflate(R.menu.episodes, menu);
|
||||
|
||||
MenuItem searchItem = menu.findItem(R.id.action_search);
|
||||
final SearchView sv = (SearchView) MenuItemCompat.getActionView(searchItem);
|
||||
@ -206,11 +206,13 @@ public class AllEpisodesFragment extends Fragment {
|
||||
@Override
|
||||
public void onPrepareOptionsMenu(Menu menu) {
|
||||
super.onPrepareOptionsMenu(menu);
|
||||
if (itemsLoaded) {
|
||||
MenuItem menuItem = menu.findItem(R.id.mark_all_read_item);
|
||||
if (menuItem != null) {
|
||||
menuItem.setVisible(episodes != null && !episodes.isEmpty());
|
||||
}
|
||||
MenuItem markAllRead = menu.findItem(R.id.mark_all_read_item);
|
||||
if (markAllRead != null) {
|
||||
markAllRead.setVisible(!showOnlyNewEpisodes() && episodes != null && !episodes.isEmpty());
|
||||
}
|
||||
MenuItem markAllSeen = menu.findItem(R.id.mark_all_seen_item);
|
||||
if(markAllSeen != null) {
|
||||
markAllSeen.setVisible(showOnlyNewEpisodes() && episodes != null && !episodes.isEmpty());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7,6 +7,8 @@ import android.support.v7.widget.RecyclerView;
|
||||
import android.support.v7.widget.helper.ItemTouchHelper;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
@ -92,7 +94,7 @@ public class NewEpisodesFragment extends AllEpisodesFragment {
|
||||
}
|
||||
};
|
||||
|
||||
Snackbar snackbar = Snackbar.make(root, getString(R.string.marked_as_read_label),
|
||||
Snackbar snackbar = Snackbar.make(root, getString(R.string.marked_as_seen_label),
|
||||
Snackbar.LENGTH_LONG);
|
||||
snackbar.setAction(getString(R.string.undo), v -> {
|
||||
DBWriter.markItemPlayed(FeedItem.NEW, item.getId());
|
||||
|
@ -24,4 +24,11 @@
|
||||
custom:showAsAction="collapseActionView"
|
||||
android:icon="?attr/navigation_accept"/>
|
||||
|
||||
</menu>
|
||||
<item
|
||||
android:id="@+id/mark_all_seen_item"
|
||||
android:title="@string/mark_all_seen_label"
|
||||
android:menuCategory="container"
|
||||
custom:showAsAction="collapseActionView"
|
||||
android:icon="?attr/navigation_accept"/>
|
||||
|
||||
</menu>
|
@ -142,6 +142,7 @@
|
||||
<string name="stream_label">Stream</string>
|
||||
<string name="remove_label">Remove</string>
|
||||
<string name="remove_episode_lable">Remove Episode</string>
|
||||
<string name="marked_as_seen_label">Marked as seen</string>
|
||||
<string name="mark_read_label">Mark as played</string>
|
||||
<string name="marked_as_read_label">Marked as played</string>
|
||||
<string name="mark_unread_label">Mark as unplayed</string>
|
||||
|
Loading…
Reference in New Issue
Block a user