Skip to content

Commit

Permalink
fix(drafts): fix crash when editing a draft with a poll
Browse files Browse the repository at this point in the history
 Fixes #243
  • Loading branch information
LucasGGamerM committed Sep 21, 2023
1 parent 2c82463 commit f5aff4d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ public void setView(View view, Bundle savedInstanceState){
DraftPollOption opt=createDraftPollOption(false);
opt.edit.setText(eopt.title);
}
pollDuration=(int)fragment.editingStatus.poll.expiresAt.minus(fragment.editingStatus.createdAt.toEpochMilli(), ChronoUnit.MILLIS).getEpochSecond();
if(fragment.editingStatus.poll.expiresAt!=null)
pollDuration=(int)fragment.editingStatus.poll.expiresAt.minus(fragment.editingStatus.createdAt.toEpochMilli(), ChronoUnit.MILLIS).getEpochSecond();
updatePollOptionHints();
pollDurationValue.setText(UiUtils.formatDuration(fragment.getContext(), pollDuration));
pollIsMultipleChoice=fragment.editingStatus.poll.multiple;
Expand Down

0 comments on commit f5aff4d

Please sign in to comment.