mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-12-27 03:18:24 +01:00
Ignore NotifyDataSetChanged lint warnings for Markwon adapters (#1228)
There is no "more efficient" way to update it
This commit is contained in:
parent
c42f183696
commit
2ff6bcfcd7
@ -213,6 +213,7 @@ public class CommentActivity extends BaseActivity implements UploadImageEnabledA
|
||||
binding.commentContentMarkdownView.setLayoutManager(new LinearLayoutManagerBugFixed(this));
|
||||
binding.commentContentMarkdownView.setAdapter(markwonAdapter);
|
||||
markwonAdapter.setMarkdown(postBodyMarkwon, parentBodyMarkdown);
|
||||
// noinspection NotifyDataSetChanged
|
||||
markwonAdapter.notifyDataSetChanged();
|
||||
}
|
||||
parentFullname = intent.getStringExtra(EXTRA_PARENT_FULLNAME_KEY);
|
||||
|
@ -162,6 +162,7 @@ public class FullMarkdownActivity extends BaseActivity {
|
||||
markdownRecyclerView.setLayoutManager(linearLayoutManager);
|
||||
markdownRecyclerView.setAdapter(markwonAdapter);
|
||||
markwonAdapter.setMarkdown(markwon, commentMarkdown);
|
||||
// noinspection NotifyDataSetChanged
|
||||
markwonAdapter.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
|
@ -204,6 +204,7 @@ public class WikiActivity extends BaseActivity {
|
||||
loadWiki();
|
||||
} else {
|
||||
markwonAdapter.setMarkdown(markwon, wikiMarkdown);
|
||||
// noinspection NotifyDataSetChanged
|
||||
markwonAdapter.notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
@ -227,6 +228,7 @@ public class WikiActivity extends BaseActivity {
|
||||
String markdown = new JSONObject(response.body())
|
||||
.getJSONObject(JSONUtils.DATA_KEY).getString(JSONUtils.CONTENT_MD_KEY);
|
||||
markwonAdapter.setMarkdown(markwon, Utils.modifyMarkdown(markdown));
|
||||
// noinspection NotifyDataSetChanged
|
||||
markwonAdapter.notifyDataSetChanged();
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
|
@ -216,6 +216,7 @@ public class CommentsListingRecyclerViewAdapter extends PagedListAdapter<Comment
|
||||
}
|
||||
|
||||
((CommentViewHolder) holder).markwonAdapter.setMarkdown(mMarkwon, comment.getCommentMarkdown());
|
||||
// noinspection NotifyDataSetChanged
|
||||
((CommentViewHolder) holder).markwonAdapter.notifyDataSetChanged();
|
||||
|
||||
String commentText = "";
|
||||
|
@ -440,6 +440,7 @@ public class CommentsRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerVi
|
||||
}
|
||||
|
||||
((CommentViewHolder) holder).mMarkwonAdapter.setMarkdown(mCommentMarkwon, comment.getCommentMarkdown());
|
||||
// noinspection NotifyDataSetChanged
|
||||
((CommentViewHolder) holder).mMarkwonAdapter.notifyDataSetChanged();
|
||||
|
||||
if (!mHideTheNumberOfVotes) {
|
||||
|
@ -120,7 +120,6 @@ public class CustomizeThemeRecyclerViewAdapter extends RecyclerView.Adapter<Recy
|
||||
|
||||
public void setCustomThemeSettingsItem(ArrayList<CustomThemeSettingsItem> customThemeSettingsItems) {
|
||||
this.customThemeSettingsItems.clear();
|
||||
notifyDataSetChanged();
|
||||
this.customThemeSettingsItems.addAll(customThemeSettingsItems);
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
@ -643,6 +643,7 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler
|
||||
((PostDetailBaseViewHolder) holder).mContentMarkdownView.setVisibility(View.VISIBLE);
|
||||
((PostDetailBaseViewHolder) holder).mContentMarkdownView.setAdapter(mMarkwonAdapter);
|
||||
mMarkwonAdapter.setMarkdown(mPostDetailMarkwon, mPost.getSelfText());
|
||||
// noinspection NotifyDataSetChanged
|
||||
mMarkwonAdapter.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
|
@ -169,6 +169,7 @@ public class SidebarFragment extends Fragment {
|
||||
sidebarDescription = subredditData.getSidebarDescription();
|
||||
if (sidebarDescription != null && !sidebarDescription.equals("")) {
|
||||
markwonAdapter.setMarkdown(markwon, sidebarDescription);
|
||||
// noinspection NotifyDataSetChanged
|
||||
markwonAdapter.notifyDataSetChanged();
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user