Filter posts option in toolbar.

This commit is contained in:
Alex Ning 2021-10-09 18:54:09 +08:00
parent 7feb78f133
commit ff69387221
2 changed files with 13 additions and 0 deletions

View File

@ -1288,6 +1288,10 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
} else {
lazyModeItem.setTitle(R.string.action_start_lazy_mode);
}
if (activity instanceof FilteredPostsActivity) {
menu.findItem(R.id.action_filter_posts_post_fragment).setVisible(false);
}
}
@Override
@ -1299,6 +1303,9 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
startLazyMode();
}
return true;
} else if (item.getItemId() == R.id.action_filter_posts_post_fragment) {
filterPosts();
return true;
}
return false;
}

View File

@ -5,4 +5,10 @@
android:id="@+id/action_lazy_mode_post_fragment"
android:orderInCategory="100"
app:showAsAction="never" />
<item
android:id="@+id/action_filter_posts_post_fragment"
android:orderInCategory="101"
android:title="@string/filter_posts"
app:showAsAction="never" />
</menu>