Skip to content

Commit

Permalink
Fix crash when cleared ShareViewModel.
Browse files Browse the repository at this point in the history
  • Loading branch information
greyson-signal committed Feb 14, 2020
1 parent 16ebf05 commit 9fbc50d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ boolean isExternalShare() {
protected void onCleared() {
ShareData data = shareData.getValue() != null ? shareData.getValue().orNull() : null;

if (data != null && data.isExternal() && !mediaUsed) {
if (data != null && data.isExternal() && data.isForIntent() && !mediaUsed) {
Log.i(TAG, "Clearing out unused data.");
BlobProvider.getInstance().delete(context, data.getUri());
}
Expand Down

0 comments on commit 9fbc50d

Please sign in to comment.