don't apply title for hashtags/lists

closes sk22#343
This commit is contained in:
sk 2023-01-24 11:20:14 +01:00 committed by LucasGGamerM
parent 186604931d
commit abf801742f
1 changed files with 4 additions and 8 deletions

View File

@ -31,7 +31,7 @@ public class TimelineDefinition {
private @Nullable String hashtagName; private @Nullable String hashtagName;
public static TimelineDefinition ofList(String listId, String listTitle) { public static TimelineDefinition ofList(String listId, String listTitle) {
TimelineDefinition def = new TimelineDefinition(TimelineType.LIST, listTitle); TimelineDefinition def = new TimelineDefinition(TimelineType.LIST);
def.listId = listId; def.listId = listId;
def.listTitle = listTitle; def.listTitle = listTitle;
return def; return def;
@ -42,7 +42,7 @@ public class TimelineDefinition {
} }
public static TimelineDefinition ofHashtag(String hashtag) { public static TimelineDefinition ofHashtag(String hashtag) {
TimelineDefinition def = new TimelineDefinition(TimelineType.HASHTAG, hashtag); TimelineDefinition def = new TimelineDefinition(TimelineType.HASHTAG);
def.hashtagName = hashtag; def.hashtagName = hashtag;
return def; return def;
} }
@ -58,11 +58,6 @@ public class TimelineDefinition {
this.type = type; this.type = type;
} }
public TimelineDefinition(TimelineType type, String title) {
this.type = type;
this.title = title;
}
public String getTitle(Context ctx) { public String getTitle(Context ctx) {
return title != null ? title : getDefaultTitle(ctx); return title != null ? title : getDefaultTitle(ctx);
} }
@ -142,7 +137,8 @@ public class TimelineDefinition {
} }
public TimelineDefinition copy() { public TimelineDefinition copy() {
TimelineDefinition def = new TimelineDefinition(type, title); TimelineDefinition def = new TimelineDefinition(type);
def.title = title;
def.listId = listId; def.listId = listId;
def.listTitle = listTitle; def.listTitle = listTitle;
def.hashtagName = hashtagName; def.hashtagName = hashtagName;