Loading app/src/main/java/app/fedilab/android/mastodon/client/entities/lemmy/LemmyPost.java +12 −1 Original line number Diff line number Diff line Loading @@ -80,7 +80,7 @@ public class LemmyPost implements Serializable { account.avatar_static = lemmyPost.creator.avatar; status.account = account; if (lemmyPost.post.thumbnail_url != null) { if (lemmyPost.comment == null && lemmyPost.post.thumbnail_url != null) { List<Attachment> attachmentList = new ArrayList<>(); Attachment attachment = new Attachment(); attachment.type = "image"; Loading @@ -91,6 +91,17 @@ public class LemmyPost implements Serializable { } attachmentList.add(attachment); status.media_attachments = attachmentList; } else if (lemmyPost.comment != null && lemmyPost.comment.thumbnail_url != null) { List<Attachment> attachmentList = new ArrayList<>(); Attachment attachment = new Attachment(); attachment.type = "image"; attachment.url = lemmyPost.comment.thumbnail_url; attachment.preview_url = lemmyPost.comment.thumbnail_url; if (lemmyPost.post.nsfw) { status.sensitive = true; } attachmentList.add(attachment); status.media_attachments = attachmentList; } return status; } Loading app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusAdapter.java +2 −3 Original line number Diff line number Diff line Loading @@ -191,7 +191,6 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> private final boolean minified; private final Timeline.TimeLineEnum timelineType; public RemoteInstance.InstanceType type; public String lemmy_post_id; public PinnedTimeline pinnedTimeline; private final boolean canBeFederated; private final boolean checkRemotely; Loading Loading @@ -1996,11 +1995,11 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> } else { if (remote) { //Lemmy main post that should open Lemmy threads if (adapter instanceof StatusAdapter && ((StatusAdapter) adapter).type == RemoteInstance.InstanceType.LEMMY && ((StatusAdapter) adapter).lemmy_post_id == null) { if (adapter instanceof StatusAdapter && ((StatusAdapter) adapter).type == RemoteInstance.InstanceType.LEMMY) { Bundle bundle = new Bundle(); bundle.putSerializable(Helper.ARG_REMOTE_INSTANCE, ((StatusAdapter) adapter).pinnedTimeline); bundle.putSerializable(Helper.ARG_TIMELINE_TYPE, Timeline.TimeLineEnum.REMOTE); bundle.putSerializable(Helper.ARG_LEMMY_POST_ID, ((StatusAdapter) adapter).lemmy_post_id); bundle.putString(Helper.ARG_LEMMY_POST_ID, status.id); Intent intent = new Intent(context, TimelineActivity.class); intent.putExtras(bundle); context.startActivity(intent); Loading app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentMastodonTimeline.java +0 −1 Original line number Diff line number Diff line Loading @@ -632,7 +632,6 @@ public class FragmentMastodonTimeline extends Fragment implements StatusAdapter. if (pinnedTimeline != null && pinnedTimeline.remoteInstance != null) { statusAdapter.type = pinnedTimeline.remoteInstance.type; } statusAdapter.lemmy_post_id = lemmy_post_id; //--------------- if (statusReport != null) { Loading Loading
app/src/main/java/app/fedilab/android/mastodon/client/entities/lemmy/LemmyPost.java +12 −1 Original line number Diff line number Diff line Loading @@ -80,7 +80,7 @@ public class LemmyPost implements Serializable { account.avatar_static = lemmyPost.creator.avatar; status.account = account; if (lemmyPost.post.thumbnail_url != null) { if (lemmyPost.comment == null && lemmyPost.post.thumbnail_url != null) { List<Attachment> attachmentList = new ArrayList<>(); Attachment attachment = new Attachment(); attachment.type = "image"; Loading @@ -91,6 +91,17 @@ public class LemmyPost implements Serializable { } attachmentList.add(attachment); status.media_attachments = attachmentList; } else if (lemmyPost.comment != null && lemmyPost.comment.thumbnail_url != null) { List<Attachment> attachmentList = new ArrayList<>(); Attachment attachment = new Attachment(); attachment.type = "image"; attachment.url = lemmyPost.comment.thumbnail_url; attachment.preview_url = lemmyPost.comment.thumbnail_url; if (lemmyPost.post.nsfw) { status.sensitive = true; } attachmentList.add(attachment); status.media_attachments = attachmentList; } return status; } Loading
app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusAdapter.java +2 −3 Original line number Diff line number Diff line Loading @@ -191,7 +191,6 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> private final boolean minified; private final Timeline.TimeLineEnum timelineType; public RemoteInstance.InstanceType type; public String lemmy_post_id; public PinnedTimeline pinnedTimeline; private final boolean canBeFederated; private final boolean checkRemotely; Loading Loading @@ -1996,11 +1995,11 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> } else { if (remote) { //Lemmy main post that should open Lemmy threads if (adapter instanceof StatusAdapter && ((StatusAdapter) adapter).type == RemoteInstance.InstanceType.LEMMY && ((StatusAdapter) adapter).lemmy_post_id == null) { if (adapter instanceof StatusAdapter && ((StatusAdapter) adapter).type == RemoteInstance.InstanceType.LEMMY) { Bundle bundle = new Bundle(); bundle.putSerializable(Helper.ARG_REMOTE_INSTANCE, ((StatusAdapter) adapter).pinnedTimeline); bundle.putSerializable(Helper.ARG_TIMELINE_TYPE, Timeline.TimeLineEnum.REMOTE); bundle.putSerializable(Helper.ARG_LEMMY_POST_ID, ((StatusAdapter) adapter).lemmy_post_id); bundle.putString(Helper.ARG_LEMMY_POST_ID, status.id); Intent intent = new Intent(context, TimelineActivity.class); intent.putExtras(bundle); context.startActivity(intent); Loading
app/src/main/java/app/fedilab/android/mastodon/ui/fragment/timeline/FragmentMastodonTimeline.java +0 −1 Original line number Diff line number Diff line Loading @@ -632,7 +632,6 @@ public class FragmentMastodonTimeline extends Fragment implements StatusAdapter. if (pinnedTimeline != null && pinnedTimeline.remoteInstance != null) { statusAdapter.type = pinnedTimeline.remoteInstance.type; } statusAdapter.lemmy_post_id = lemmy_post_id; //--------------- if (statusReport != null) { Loading