Skip to content

Commit

Permalink
Remove hasChangedSelectedBlogs logic
Browse files Browse the repository at this point in the history
  • Loading branch information
RenanLukas committed Feb 5, 2024
1 parent 7b51bf2 commit 23e8fa3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,21 +88,6 @@ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
return view;
}

public boolean hasChangedSelectedBlogs() {
final Set<String> initialBlogsUrls = new HashSet<>();
for (final ReaderBlog readerBlog : mInitialReaderBlogList) {
initialBlogsUrls.add(readerBlog.getUrl());
}
final List<ReaderBlog> currentReaderBlogList = mAdapter.getItems();
final Set<String> currentBlogsUrls = new HashSet<>();
if (currentReaderBlogList != null) {
for (final ReaderBlog readerBlog : currentReaderBlogList) {
currentBlogsUrls.add(readerBlog.getUrl());
}
}
return !(initialBlogsUrls.equals(currentBlogsUrls));
}

private void checkEmptyView() {
if (!isAdded() || getView() == null) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,7 @@ private void setResult() {
final ReaderTagFragment readerTagFragment = mPageAdapter.getReaderTagFragment();
final ReaderBlogFragment readerBlogFragment = mPageAdapter.getReaderBlogFragment();
if (readerTagFragment != null && readerBlogFragment != null) {
shouldRefreshSubscriptions = readerTagFragment.hasChangedSelectedTags()
|| readerBlogFragment.hasChangedSelectedBlogs();
shouldRefreshSubscriptions = readerTagFragment.hasChangedSelectedTags();
}
}
data.putExtra(RESULT_SHOULD_REFRESH_SUBSCRIPTIONS, shouldRefreshSubscriptions);
Expand Down

0 comments on commit 23e8fa3

Please sign in to comment.