Browse Source

restore muting reels setting

master
Austin Huang 3 years ago
parent
commit
2b89e2fbb6
No known key found for this signature in database GPG Key ID: 84C23AA04587A91F
  1. 8
      app/src/main/java/awais/instagrabber/fragments/main/FeedFragment.java

8
app/src/main/java/awais/instagrabber/fragments/main/FeedFragment.java

@ -30,6 +30,7 @@ import com.google.common.collect.ImmutableList;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import java.util.stream.Collectors;
import awais.instagrabber.R; import awais.instagrabber.R;
import awais.instagrabber.activities.MainActivity; import awais.instagrabber.activities.MainActivity;
@ -39,6 +40,7 @@ import awais.instagrabber.asyncs.FeedPostFetchService;
import awais.instagrabber.customviews.PrimaryActionModeCallback; import awais.instagrabber.customviews.PrimaryActionModeCallback;
import awais.instagrabber.databinding.FragmentFeedBinding; import awais.instagrabber.databinding.FragmentFeedBinding;
import awais.instagrabber.dialogs.PostsLayoutPreferencesDialogFragment; import awais.instagrabber.dialogs.PostsLayoutPreferencesDialogFragment;
import awais.instagrabber.fragments.settings.PreferenceKeys;
import awais.instagrabber.models.PostsLayoutPreferences; import awais.instagrabber.models.PostsLayoutPreferences;
import awais.instagrabber.repositories.requests.StoryViewerOptions; import awais.instagrabber.repositories.requests.StoryViewerOptions;
import awais.instagrabber.repositories.responses.Location; import awais.instagrabber.repositories.responses.Location;
@ -405,6 +407,12 @@ public class FeedFragment extends Fragment implements SwipeRefreshLayout.OnRefre
} }
storiesFetching = false; storiesFetching = false;
//noinspection unchecked //noinspection unchecked
if (Utils.settingsHelper.getBoolean(PreferenceKeys.HIDE_MUTED_REELS)) {
feedStoriesViewModel.getList().postValue(feedStoryModels
.stream()
.filter(s -> s.getMuted() != true)
.collect(Collectors.toList()));
}
feedStoriesViewModel.getList().postValue((List<Story>) feedStoryModels); feedStoriesViewModel.getList().postValue((List<Story>) feedStoryModels);
if (storyListMenu != null) storyListMenu.setVisible(true); if (storyListMenu != null) storyListMenu.setVisible(true);
updateSwipeRefreshState(); updateSwipeRefreshState();

Loading…
Cancel
Save