Don't hide read posts on saved page

This commit fixes the issue where if the option to hide read posts from the feed is activated, no posts show up in the saved section.

Fixes #219.
This commit is contained in:
Balazs Toldi 2024-06-23 14:18:17 +02:00
parent 6c3d26fe5a
commit 03c1792262

View File

@ -180,7 +180,7 @@ public class PostViewModel extends ViewModel {
post -> !post.isRead() || !currentlyReadPostIdsLiveData.getValue()))), ViewModelKt.getViewModelScope(this));
currentlyReadPostIdsLiveData.setValue(postHistorySharedPreferences != null
&& postHistorySharedPreferences.getBoolean((accountName == null ? "" : accountName) + SharedPreferencesUtils.HIDE_READ_POSTS_AUTOMATICALLY_BASE, false));
&& postHistorySharedPreferences.getBoolean((accountName == null ? "" : accountName) + SharedPreferencesUtils.HIDE_READ_POSTS_AUTOMATICALLY_BASE, false) && !userWhere.equals(PostPagingSource.USER_WHERE_SAVED));
}
public PostViewModel(Executor executor, RetrofitHolder retrofit, String accessToken, String accountName,