fix(custom-timelines): lookup profile by url
Closes #107. Instead of using the (wrong) profileID on CustomTimelines, use the URL, which will be correctly resolved.
This commit is contained in:
parent
48bd277769
commit
d687abcdc1
|
@ -47,6 +47,7 @@ public class CustomLocalTimelineFragment extends StatusListFragment {
|
||||||
result=result.stream().filter(new StatusFilterPredicate(accountID, Filter.FilterContext.PUBLIC)).collect(Collectors.toList());
|
result=result.stream().filter(new StatusFilterPredicate(accountID, Filter.FilterContext.PUBLIC)).collect(Collectors.toList());
|
||||||
result.stream().forEach(status -> {
|
result.stream().forEach(status -> {
|
||||||
status.account.acct += "@"+domain;
|
status.account.acct += "@"+domain;
|
||||||
|
status.mentions.forEach(mention -> mention.id = null);
|
||||||
status.reloadWhenClicked = true;
|
status.reloadWhenClicked = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -100,7 +100,7 @@ public class HtmlParser{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, String> idsByUrl=mentions.stream().collect(Collectors.toMap(m->m.url, m->m.id));
|
Map<String, String> idsByUrl=mentions.stream().filter(mention -> mention.id != null).collect(Collectors.toMap(m->m.url, m->m.id));
|
||||||
// Hashtags in remote posts have remote URLs, these have local URLs so they don't match.
|
// Hashtags in remote posts have remote URLs, these have local URLs so they don't match.
|
||||||
// Map<String, String> tagsByUrl=tags.stream().collect(Collectors.toMap(t->t.url, t->t.name));
|
// Map<String, String> tagsByUrl=tags.stream().collect(Collectors.toMap(t->t.url, t->t.name));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue