1
0
mirror of https://github.com/KokaKiwi/BarInsta synced 2024-11-26 08:37:29 +00:00

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

This commit is contained in:
Ammar Githam 2021-03-18 21:57:49 +09:00
parent 565a8d3dd6
commit 863a06f3af

View File

@ -885,7 +885,11 @@ public class StoryViewerFragment extends Fragment {
final ActionBar actionBar = fragmentActivity.getSupportActionBar(); final ActionBar actionBar = fragmentActivity.getSupportActionBar();
if (actionBar != null) { 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)) if (settingsHelper.getBoolean(MARK_AS_SEEN))