Browse Source

Surrounding setSubtitle with try-catch to avoid crash. Handles 2nd part of https://github.com/austinhuang0131/barinsta/issues/816

renovate/org.robolectric-robolectric-4.x
Ammar Githam 4 years ago
parent
commit
863a06f3af
  1. 6
      app/src/main/java/awais/instagrabber/fragments/StoryViewerFragment.java

6
app/src/main/java/awais/instagrabber/fragments/StoryViewerFragment.java

@ -885,7 +885,11 @@ public class StoryViewerFragment extends Fragment {
final ActionBar actionBar = fragmentActivity.getSupportActionBar();
if (actionBar != null) {
actionBar.setSubtitle(Utils.datetimeParser.format(new Date(currentStory.getTimestamp() * 1000L)));
try {
actionBar.setSubtitle(Utils.datetimeParser.format(new Date(currentStory.getTimestamp() * 1000L)));
} catch (Exception e) {
Log.e(TAG, "refreshStory: ", e);
}
}
if (settingsHelper.getBoolean(MARK_AS_SEEN))

Loading…
Cancel
Save