make announcements selectable

closes sk22#275
This commit is contained in:
sk 2023-01-16 20:23:38 +01:00 committed by LucasGGamerM
parent 7fa52247e8
commit 480d4ad904
1 changed files with 4 additions and 3 deletions

View File

@ -66,9 +66,11 @@ public class AnnouncementsFragment extends BaseStatusListFragment<Announcement>
instanceUser.avatar = instanceUser.avatarStatic = instance.thumbnail; instanceUser.avatar = instanceUser.avatarStatic = instance.thumbnail;
instanceUser.emojis = List.of(); instanceUser.emojis = List.of();
Status fakeStatus = a.toStatus(); Status fakeStatus = a.toStatus();
TextStatusDisplayItem textItem = new TextStatusDisplayItem(a.id, HtmlParser.parse(a.content, a.emojis, a.mentions, a.tags, accountID), this, fakeStatus);
textItem.textSelectable = true;
return List.of( return List.of(
HeaderStatusDisplayItem.fromAnnouncement(a, fakeStatus, instanceUser, this, accountID, this::onMarkAsRead), HeaderStatusDisplayItem.fromAnnouncement(a, fakeStatus, instanceUser, this, accountID, this::onMarkAsRead),
new TextStatusDisplayItem(a.id, HtmlParser.parse(a.content, a.emojis, a.mentions, a.tags, accountID), this, fakeStatus) textItem
); );
} }
@ -87,8 +89,7 @@ public class AnnouncementsFragment extends BaseStatusListFragment<Announcement>
protected void addAccountToKnown(Announcement s) {} protected void addAccountToKnown(Announcement s) {}
@Override @Override
public void onItemClick(String id) { public void onItemClick(String id) {}
}
@Override @Override
protected void doLoadData(int offset, int count){ protected void doLoadData(int offset, int count){