mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-11-10 12:47:26 +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.setLayoutManager(new LinearLayoutManagerBugFixed(this));
|
||||||
binding.commentContentMarkdownView.setAdapter(markwonAdapter);
|
binding.commentContentMarkdownView.setAdapter(markwonAdapter);
|
||||||
markwonAdapter.setMarkdown(postBodyMarkwon, parentBodyMarkdown);
|
markwonAdapter.setMarkdown(postBodyMarkwon, parentBodyMarkdown);
|
||||||
|
// noinspection NotifyDataSetChanged
|
||||||
markwonAdapter.notifyDataSetChanged();
|
markwonAdapter.notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
parentFullname = intent.getStringExtra(EXTRA_PARENT_FULLNAME_KEY);
|
parentFullname = intent.getStringExtra(EXTRA_PARENT_FULLNAME_KEY);
|
||||||
|
@ -162,6 +162,7 @@ public class FullMarkdownActivity extends BaseActivity {
|
|||||||
markdownRecyclerView.setLayoutManager(linearLayoutManager);
|
markdownRecyclerView.setLayoutManager(linearLayoutManager);
|
||||||
markdownRecyclerView.setAdapter(markwonAdapter);
|
markdownRecyclerView.setAdapter(markwonAdapter);
|
||||||
markwonAdapter.setMarkdown(markwon, commentMarkdown);
|
markwonAdapter.setMarkdown(markwon, commentMarkdown);
|
||||||
|
// noinspection NotifyDataSetChanged
|
||||||
markwonAdapter.notifyDataSetChanged();
|
markwonAdapter.notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -204,6 +204,7 @@ public class WikiActivity extends BaseActivity {
|
|||||||
loadWiki();
|
loadWiki();
|
||||||
} else {
|
} else {
|
||||||
markwonAdapter.setMarkdown(markwon, wikiMarkdown);
|
markwonAdapter.setMarkdown(markwon, wikiMarkdown);
|
||||||
|
// noinspection NotifyDataSetChanged
|
||||||
markwonAdapter.notifyDataSetChanged();
|
markwonAdapter.notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -227,6 +228,7 @@ public class WikiActivity extends BaseActivity {
|
|||||||
String markdown = new JSONObject(response.body())
|
String markdown = new JSONObject(response.body())
|
||||||
.getJSONObject(JSONUtils.DATA_KEY).getString(JSONUtils.CONTENT_MD_KEY);
|
.getJSONObject(JSONUtils.DATA_KEY).getString(JSONUtils.CONTENT_MD_KEY);
|
||||||
markwonAdapter.setMarkdown(markwon, Utils.modifyMarkdown(markdown));
|
markwonAdapter.setMarkdown(markwon, Utils.modifyMarkdown(markdown));
|
||||||
|
// noinspection NotifyDataSetChanged
|
||||||
markwonAdapter.notifyDataSetChanged();
|
markwonAdapter.notifyDataSetChanged();
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
@ -216,6 +216,7 @@ public class CommentsListingRecyclerViewAdapter extends PagedListAdapter<Comment
|
|||||||
}
|
}
|
||||||
|
|
||||||
((CommentViewHolder) holder).markwonAdapter.setMarkdown(mMarkwon, comment.getCommentMarkdown());
|
((CommentViewHolder) holder).markwonAdapter.setMarkdown(mMarkwon, comment.getCommentMarkdown());
|
||||||
|
// noinspection NotifyDataSetChanged
|
||||||
((CommentViewHolder) holder).markwonAdapter.notifyDataSetChanged();
|
((CommentViewHolder) holder).markwonAdapter.notifyDataSetChanged();
|
||||||
|
|
||||||
String commentText = "";
|
String commentText = "";
|
||||||
|
@ -440,6 +440,7 @@ public class CommentsRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerVi
|
|||||||
}
|
}
|
||||||
|
|
||||||
((CommentViewHolder) holder).mMarkwonAdapter.setMarkdown(mCommentMarkwon, comment.getCommentMarkdown());
|
((CommentViewHolder) holder).mMarkwonAdapter.setMarkdown(mCommentMarkwon, comment.getCommentMarkdown());
|
||||||
|
// noinspection NotifyDataSetChanged
|
||||||
((CommentViewHolder) holder).mMarkwonAdapter.notifyDataSetChanged();
|
((CommentViewHolder) holder).mMarkwonAdapter.notifyDataSetChanged();
|
||||||
|
|
||||||
if (!mHideTheNumberOfVotes) {
|
if (!mHideTheNumberOfVotes) {
|
||||||
|
@ -120,7 +120,6 @@ public class CustomizeThemeRecyclerViewAdapter extends RecyclerView.Adapter<Recy
|
|||||||
|
|
||||||
public void setCustomThemeSettingsItem(ArrayList<CustomThemeSettingsItem> customThemeSettingsItems) {
|
public void setCustomThemeSettingsItem(ArrayList<CustomThemeSettingsItem> customThemeSettingsItems) {
|
||||||
this.customThemeSettingsItems.clear();
|
this.customThemeSettingsItems.clear();
|
||||||
notifyDataSetChanged();
|
|
||||||
this.customThemeSettingsItems.addAll(customThemeSettingsItems);
|
this.customThemeSettingsItems.addAll(customThemeSettingsItems);
|
||||||
notifyDataSetChanged();
|
notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
|
@ -643,6 +643,7 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler
|
|||||||
((PostDetailBaseViewHolder) holder).mContentMarkdownView.setVisibility(View.VISIBLE);
|
((PostDetailBaseViewHolder) holder).mContentMarkdownView.setVisibility(View.VISIBLE);
|
||||||
((PostDetailBaseViewHolder) holder).mContentMarkdownView.setAdapter(mMarkwonAdapter);
|
((PostDetailBaseViewHolder) holder).mContentMarkdownView.setAdapter(mMarkwonAdapter);
|
||||||
mMarkwonAdapter.setMarkdown(mPostDetailMarkwon, mPost.getSelfText());
|
mMarkwonAdapter.setMarkdown(mPostDetailMarkwon, mPost.getSelfText());
|
||||||
|
// noinspection NotifyDataSetChanged
|
||||||
mMarkwonAdapter.notifyDataSetChanged();
|
mMarkwonAdapter.notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -169,6 +169,7 @@ public class SidebarFragment extends Fragment {
|
|||||||
sidebarDescription = subredditData.getSidebarDescription();
|
sidebarDescription = subredditData.getSidebarDescription();
|
||||||
if (sidebarDescription != null && !sidebarDescription.equals("")) {
|
if (sidebarDescription != null && !sidebarDescription.equals("")) {
|
||||||
markwonAdapter.setMarkdown(markwon, sidebarDescription);
|
markwonAdapter.setMarkdown(markwon, sidebarDescription);
|
||||||
|
// noinspection NotifyDataSetChanged
|
||||||
markwonAdapter.notifyDataSetChanged();
|
markwonAdapter.notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user