aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2022-02-04 03:26:45 +0000
committerAlex Ning <chineseperson5@gmail.com>2022-02-04 03:26:45 +0000
commit101525ae334b55cfcad887a64811c3b31ac8753a (patch)
treed7b3c5cb2d1061bcdf750a5709320c4a0e684d36 /app
parent5713982e8f3a3618a5afda26a19a3422d017ff2a (diff)
downloadinfinity-for-reddit-101525ae334b55cfcad887a64811c3b31ac8753a.tar
infinity-for-reddit-101525ae334b55cfcad887a64811c3b31ac8753a.tar.gz
infinity-for-reddit-101525ae334b55cfcad887a64811c3b31ac8753a.tar.bz2
infinity-for-reddit-101525ae334b55cfcad887a64811c3b31ac8753a.tar.lz
infinity-for-reddit-101525ae334b55cfcad887a64811c3b31ac8753a.tar.xz
infinity-for-reddit-101525ae334b55cfcad887a64811c3b31ac8753a.tar.zst
infinity-for-reddit-101525ae334b55cfcad887a64811c3b31ac8753a.zip
Minor bugs fixed.
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewPostDetailFragment.java9
-rw-r--r--app/src/main/res/values-uk/strings.xml2
2 files changed, 8 insertions, 3 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewPostDetailFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewPostDetailFragment.java
index d9e9f452..700a6a84 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewPostDetailFragment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewPostDetailFragment.java
@@ -1216,9 +1216,12 @@ public class ViewPostDetailFragment extends Fragment implements FragmentCommunic
sortType, APIUtils.getOAuthHeader(mAccessToken));
}
}
- postAndComments.enqueue(new Callback<String>() {
+ postAndComments.enqueue(new Callback<>() {
@Override
public void onResponse(@NonNull Call<String> call, @NonNull Response<String> response) {
+ if (!isAdded()) {
+ return;
+ }
mSwipeRefreshLayout.setRefreshing(false);
if (response.isSuccessful()) {
@@ -1344,7 +1347,9 @@ public class ViewPostDetailFragment extends Fragment implements FragmentCommunic
@Override
public void onFailure(@NonNull Call<String> call, @NonNull Throwable t) {
- showErrorView(subredditId);
+ if (isAdded()) {
+ showErrorView(subredditId);
+ }
}
});
}
diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml
index 1ff483b1..8a49c712 100644
--- a/app/src/main/res/values-uk/strings.xml
+++ b/app/src/main/res/values-uk/strings.xml
@@ -99,7 +99,7 @@
<string name="karma_info_user_detail">"Карма:
%1$d (%2$d + %3$d)"</string>
<string name="cakeday_info">"День торта:
-%1$d"</string>
+%1$s"</string>
<string name="since">"Від:"</string>
<string name="profile">"Профіль"</string>
<string name="subscriptions">"Підписки"</string>