From 960ac3e1808a79327b8d5fc9f9615d6acad4e5c1 Mon Sep 17 00:00:00 2001 From: Austin Huang Date: Sat, 24 Oct 2020 12:21:54 -0400 Subject: [PATCH] close #191, close #222 --- .../DirectMessageThreadFragment.java | 2 +- .../fragments/main/ProfileFragment.java | 14 ++++++++------ gradle/wrapper/gradle-wrapper.properties | 4 ++-- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/awais/instagrabber/fragments/directmessages/DirectMessageThreadFragment.java b/app/src/main/java/awais/instagrabber/fragments/directmessages/DirectMessageThreadFragment.java index 2999b4fc..43325cca 100644 --- a/app/src/main/java/awais/instagrabber/fragments/directmessages/DirectMessageThreadFragment.java +++ b/app/src/main/java/awais/instagrabber/fragments/directmessages/DirectMessageThreadFragment.java @@ -425,7 +425,7 @@ public class DirectMessageThreadFragment extends Fragment { @Override public void onDestroy() { super.onDestroy(); - listViewModel.getList().postValue(Collections.emptyList()); + if (listViewModel != null) listViewModel.getList().postValue(Collections.emptyList()); } private void sendText(final String text, final String itemId, final boolean delete) { diff --git a/app/src/main/java/awais/instagrabber/fragments/main/ProfileFragment.java b/app/src/main/java/awais/instagrabber/fragments/main/ProfileFragment.java index 24a5035e..a3a6b5fd 100644 --- a/app/src/main/java/awais/instagrabber/fragments/main/ProfileFragment.java +++ b/app/src/main/java/awais/instagrabber/fragments/main/ProfileFragment.java @@ -755,12 +755,14 @@ public class ProfileFragment extends Fragment implements SwipeRefreshLayout.OnRe } private void showProfilePicDialog() { - final FragmentManager fragmentManager = getParentFragmentManager(); - final ProfilePicDialogFragment fragment = new ProfilePicDialogFragment(profileModel.getId(), username, profileModel.getHdProfilePic()); - final FragmentTransaction ft = fragmentManager.beginTransaction(); - ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN) - .add(fragment, "profilePicDialog") - .commit(); + if (profileModel != null) { + final FragmentManager fragmentManager = getParentFragmentManager(); + final ProfilePicDialogFragment fragment = new ProfilePicDialogFragment(profileModel.getId(), username, profileModel.getHdProfilePic()); + final FragmentTransaction ft = fragmentManager.beginTransaction(); + ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN) + .add(fragment, "profilePicDialog") + .commit(); + } } private void setUsernameDelayed() { diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 9022b1bb..d35bba05 100755 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionSha256Sum=10065868c78f1207afb3a92176f99a37d753a513dff453abb6b5cceda4058cda -distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip +distributionSha256Sum=5252d2f1a984e5518e604678b3964bb0227c4573fcc880b92548bc687c851704 +distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-rc-5-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists