aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorSergei Kozelko <KozelkoS@yandex.ru>2023-01-21 04:56:22 +0000
committerGitHub <noreply@github.com>2023-01-21 04:56:22 +0000
commit2ff6bcfcd75b1f1f24fa1a2544d928936c653ecc (patch)
tree3ae927237418a86876b7602186a19edf5c2b5575 /app
parentc42f18369672769b14c2e8b2ec332dec005c446c (diff)
downloadinfinity-for-reddit-2ff6bcfcd75b1f1f24fa1a2544d928936c653ecc.tar
infinity-for-reddit-2ff6bcfcd75b1f1f24fa1a2544d928936c653ecc.tar.gz
infinity-for-reddit-2ff6bcfcd75b1f1f24fa1a2544d928936c653ecc.tar.bz2
infinity-for-reddit-2ff6bcfcd75b1f1f24fa1a2544d928936c653ecc.tar.lz
infinity-for-reddit-2ff6bcfcd75b1f1f24fa1a2544d928936c653ecc.tar.xz
infinity-for-reddit-2ff6bcfcd75b1f1f24fa1a2544d928936c653ecc.tar.zst
infinity-for-reddit-2ff6bcfcd75b1f1f24fa1a2544d928936c653ecc.zip
Ignore NotifyDataSetChanged lint warnings for Markwon adapters (#1228)
There is no "more efficient" way to update it
Diffstat (limited to '')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/activities/CommentActivity.java1
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/activities/FullMarkdownActivity.java1
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/activities/WikiActivity.java2
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsListingRecyclerViewAdapter.java1
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java1
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CustomizeThemeRecyclerViewAdapter.java1
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostDetailRecyclerViewAdapter.java1
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/fragments/SidebarFragment.java1
8 files changed, 8 insertions, 1 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CommentActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CommentActivity.java
index 3db6bf20..8a50549f 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CommentActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CommentActivity.java
@@ -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);
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/FullMarkdownActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/FullMarkdownActivity.java
index 84672e37..bf1b3566 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/FullMarkdownActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/FullMarkdownActivity.java
@@ -162,6 +162,7 @@ public class FullMarkdownActivity extends BaseActivity {
markdownRecyclerView.setLayoutManager(linearLayoutManager);
markdownRecyclerView.setAdapter(markwonAdapter);
markwonAdapter.setMarkdown(markwon, commentMarkdown);
+ // noinspection NotifyDataSetChanged
markwonAdapter.notifyDataSetChanged();
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/WikiActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/WikiActivity.java
index 4944592b..09dcd5b6 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/WikiActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/WikiActivity.java
@@ -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();
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsListingRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsListingRecyclerViewAdapter.java
index 5da62b22..51a60082 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsListingRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsListingRecyclerViewAdapter.java
@@ -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 = "";
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java
index 9f782077..74c0ef53 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java
@@ -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) {
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CustomizeThemeRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CustomizeThemeRecyclerViewAdapter.java
index 02990b84..f17109d3 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CustomizeThemeRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CustomizeThemeRecyclerViewAdapter.java
@@ -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();
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostDetailRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostDetailRecyclerViewAdapter.java
index 463caeaf..cbafd113 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostDetailRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostDetailRecyclerViewAdapter.java
@@ -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();
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/SidebarFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/SidebarFragment.java
index 475c7053..462c556d 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/SidebarFragment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/SidebarFragment.java
@@ -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 {