Skip to content

Commit

Permalink
fix: fixes crashes when adding a hashtag timeline
Browse files Browse the repository at this point in the history
Closes #308
  • Loading branch information
LucasGGamerM committed Dec 6, 2023
1 parent 69a2fc2 commit 533032c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ protected void makeTimelineEditor(@Nullable TimelineDefinition item, Consumer<Ti
String name=editText.getText().toString().trim();

String mainHashtag=tagMain.getText().toString().trim();
if(item.getType()==TimelineDefinition.TimelineType.HASHTAG){
if(item != null && item.getType()==TimelineDefinition.TimelineType.HASHTAG){
tagsAny.chipifyAllUnterminatedTokens();
tagsAll.chipifyAllUnterminatedTokens();
tagsNone.chipifyAllUnterminatedTokens();
Expand All @@ -397,7 +397,7 @@ protected void makeTimelineEditor(@Nullable TimelineDefinition item, Consumer<Ti
TimelineDefinition.Icon icon=TimelineDefinition.Icon.values()[(int) btn.getTag()];
tl.setIcon(icon);
tl.setTitle(name);
if(item.getType()==TimelineDefinition.TimelineType.HASHTAG){
if(item == null || item.getType()==TimelineDefinition.TimelineType.HASHTAG){
tl.setTagOptions(
mainHashtag,
tagsAny.getChipValues(),
Expand Down

0 comments on commit 533032c

Please sign in to comment.