1
0
mirror of https://github.com/KokaKiwi/BarInsta synced 2024-11-21 22:27:29 +00:00

restore muting reels setting

This commit is contained in:
Austin Huang 2021-07-22 14:48:37 -04:00
parent a1cd590d26
commit 2b89e2fbb6
No known key found for this signature in database
GPG Key ID: 84C23AA04587A91F

View File

@ -30,6 +30,7 @@ import com.google.common.collect.ImmutableList;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
import awais.instagrabber.R;
import awais.instagrabber.activities.MainActivity;
@ -39,6 +40,7 @@ import awais.instagrabber.asyncs.FeedPostFetchService;
import awais.instagrabber.customviews.PrimaryActionModeCallback;
import awais.instagrabber.databinding.FragmentFeedBinding;
import awais.instagrabber.dialogs.PostsLayoutPreferencesDialogFragment;
import awais.instagrabber.fragments.settings.PreferenceKeys;
import awais.instagrabber.models.PostsLayoutPreferences;
import awais.instagrabber.repositories.requests.StoryViewerOptions;
import awais.instagrabber.repositories.responses.Location;
@ -405,6 +407,12 @@ public class FeedFragment extends Fragment implements SwipeRefreshLayout.OnRefre
}
storiesFetching = false;
//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);
if (storyListMenu != null) storyListMenu.setVisible(true);
updateSwipeRefreshState();