Austin Huang
4 years ago
No known key found for this signature in database
GPG Key ID: 84C23AA04587A91F
1 changed files with
5 additions and
4 deletions
-
app/src/main/java/awais/instagrabber/fragments/StoryListViewerFragment.java
|
|
@ -134,7 +134,11 @@ public final class StoryListViewerFragment extends Fragment implements SwipeRefr |
|
|
|
fragmentActivity = (AppCompatActivity) requireActivity(); |
|
|
|
context = getContext(); |
|
|
|
if (context == null) return; |
|
|
|
setHasOptionsMenu(true); |
|
|
|
final Bundle args = getArguments(); |
|
|
|
if (args == null) return; |
|
|
|
final StoryListViewerFragmentArgs fragmentArgs = StoryListViewerFragmentArgs.fromBundle(args); |
|
|
|
type = fragmentArgs.getType(); |
|
|
|
setHasOptionsMenu(type.equals("feed")); |
|
|
|
storiesRepository = StoriesRepository.Companion.getInstance(); |
|
|
|
} |
|
|
|
|
|
|
@ -195,9 +199,6 @@ public final class StoryListViewerFragment extends Fragment implements SwipeRefr |
|
|
|
|
|
|
|
private void init() { |
|
|
|
final Context context = getContext(); |
|
|
|
if (getArguments() == null) return; |
|
|
|
final StoryListViewerFragmentArgs fragmentArgs = StoryListViewerFragmentArgs.fromBundle(getArguments()); |
|
|
|
type = fragmentArgs.getType(); |
|
|
|
binding.swipeRefreshLayout.setOnRefreshListener(this); |
|
|
|
final LinearLayoutManager layoutManager = new LinearLayoutManager(context); |
|
|
|
final ActionBar actionBar = fragmentActivity.getSupportActionBar(); |
|
|
|