diff options
author | Toover <toover@toover.me> | 2022-06-03 13:29:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-03 13:29:49 +0200 |
commit | 11b9a1763e930ee3bf28976e4c0fba6ada1cf366 (patch) | |
tree | 6ea5babb7c67a878acd4a819a17b9e0ae567f979 /app | |
parent | 89cfeb93db5050ba6dcf2b6c3814bd9386f188b8 (diff) | |
download | AntennaPod-11b9a1763e930ee3bf28976e4c0fba6ada1cf366.zip |
Do not reload item description if not needed #5917 (#5918)
Not only that spares resources but it also avoid resetting the web view and its scroll.
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java index 974cbb370..83dc0c554 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java @@ -270,7 +270,7 @@ public class ItemFragment extends Fragment { } private void onFragmentLoaded() { - if (webviewData != null) { + if (webviewData != null && !itemsLoaded) { webvDescription.loadDataWithBaseURL("https://127.0.0.1", webviewData, "text/html", "utf-8", "about:blank"); } updateAppearance(); @@ -420,8 +420,8 @@ public class ItemFragment extends Fragment { .subscribe(result -> { progbarLoading.setVisibility(View.GONE); item = result; - itemsLoaded = true; onFragmentLoaded(); + itemsLoaded = true; }, error -> Log.e(TAG, Log.getStackTraceString(error))); } |