From d9cd15eb2d278e4975102d638d6d5f4e4b56a11a Mon Sep 17 00:00:00 2001 From: Grishka Date: Tue, 8 Feb 2022 13:25:17 +0300 Subject: [PATCH] Replies --- .gitignore | 1 + mastodon/.gitignore | 4 ++- .../events/StatusCountersUpdatedEvent.java | 3 +- .../android/fragments/ComposeFragment.java | 36 ++++++++++++++++++- .../fragments/NotificationsFragment.java | 2 +- .../android/model/Application.java | 2 ++ .../android/model/Attachment.java | 4 +++ .../org/joinmastodon/android/model/Card.java | 2 ++ .../joinmastodon/android/model/Hashtag.java | 2 ++ .../joinmastodon/android/model/History.java | 2 ++ .../joinmastodon/android/model/Mention.java | 2 ++ .../org/joinmastodon/android/model/Poll.java | 3 ++ .../joinmastodon/android/model/Status.java | 3 ++ .../displayitems/FooterStatusDisplayItem.java | 15 +++++--- .../displayitems/HeaderStatusDisplayItem.java | 5 +-- .../displayitems/PhotoStatusDisplayItem.java | 5 +-- .../ReblogOrReplyLineStatusDisplayItem.java | 5 +-- .../ui/displayitems/StatusDisplayItem.java | 11 +++--- .../displayitems/TextStatusDisplayItem.java | 6 ++-- .../ic_fluent_arrow_reply_20_filled.xml | 3 ++ .../src/main/res/layout/fragment_compose.xml | 14 ++++++++ mastodon/src/main/res/values/strings.xml | 2 +- 22 files changed, 110 insertions(+), 22 deletions(-) create mode 100644 mastodon/src/main/res/drawable/ic_fluent_arrow_reply_20_filled.xml diff --git a/.gitignore b/.gitignore index 10cfdbfa..593af090 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ .externalNativeBuild .cxx local.properties +*.jks diff --git a/mastodon/.gitignore b/mastodon/.gitignore index 42afabfd..327034ee 100644 --- a/mastodon/.gitignore +++ b/mastodon/.gitignore @@ -1 +1,3 @@ -/build \ No newline at end of file +/build +/release +/debug diff --git a/mastodon/src/main/java/org/joinmastodon/android/events/StatusCountersUpdatedEvent.java b/mastodon/src/main/java/org/joinmastodon/android/events/StatusCountersUpdatedEvent.java index 5eb4190d..1b006b09 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/events/StatusCountersUpdatedEvent.java +++ b/mastodon/src/main/java/org/joinmastodon/android/events/StatusCountersUpdatedEvent.java @@ -4,13 +4,14 @@ import org.joinmastodon.android.model.Status; public class StatusCountersUpdatedEvent{ public String id; - public int favorites, reblogs; + public int favorites, reblogs, replies; public boolean favorited, reblogged; public StatusCountersUpdatedEvent(Status s){ id=s.id; favorites=s.favouritesCount; reblogs=s.reblogsCount; + replies=s.repliesCount; favorited=s.favourited; reblogged=s.reblogged; } diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/ComposeFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/ComposeFragment.java index 6c6cba1c..d70be7bb 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/ComposeFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/ComposeFragment.java @@ -12,6 +12,7 @@ import android.net.Uri; import android.os.Build; import android.os.Bundle; import android.text.Editable; +import android.text.TextUtils; import android.text.TextWatcher; import android.util.Log; import android.view.Gravity; @@ -42,16 +43,19 @@ import org.joinmastodon.android.api.requests.statuses.CreateStatus; import org.joinmastodon.android.api.requests.statuses.UploadAttachment; import org.joinmastodon.android.api.session.AccountSession; import org.joinmastodon.android.api.session.AccountSessionManager; +import org.joinmastodon.android.events.StatusCountersUpdatedEvent; import org.joinmastodon.android.events.StatusCreatedEvent; import org.joinmastodon.android.model.Account; import org.joinmastodon.android.model.Attachment; import org.joinmastodon.android.model.Emoji; import org.joinmastodon.android.model.EmojiCategory; +import org.joinmastodon.android.model.Mention; import org.joinmastodon.android.model.Status; import org.joinmastodon.android.ui.CustomEmojiPopupKeyboard; import org.joinmastodon.android.ui.M3AlertDialogBuilder; import org.joinmastodon.android.ui.PopupKeyboard; import org.joinmastodon.android.ui.views.SizeListenerLinearLayout; +import org.parceler.Parcels; import java.util.ArrayList; import java.util.List; @@ -106,12 +110,15 @@ public class ComposeFragment extends ToolbarFragment implements OnBackPressedLis private Button publishButton; private ImageButton mediaBtn, pollBtn, emojiBtn, spoilerBtn, visibilityBtn; private LinearLayout attachmentsView; + private TextView replyText; private ArrayList queuedAttachments=new ArrayList<>(), failedAttachments=new ArrayList<>(), attachments=new ArrayList<>(); private DraftMediaAttachment uploadingAttachment; private List customEmojis; private CustomEmojiPopupKeyboard emojiKeyboard; + private Status replyTo; + private String initialReplyMentions; @Override public void onAttach(Activity activity){ @@ -127,6 +134,9 @@ public class ComposeFragment extends ToolbarFragment implements OnBackPressedLis customEmojis=AccountSessionManager.getInstance().getCustomEmojis(instanceDomain); emojiKeyboard=new CustomEmojiPopupKeyboard(activity, customEmojis, instanceDomain); emojiKeyboard.setListener(this::onCustomEmojiClick); + + if(getArguments().containsKey("replyTo")) + replyTo=Parcels.unwrap(getArguments().getParcelable("replyTo")); } @Override @@ -156,6 +166,7 @@ public class ComposeFragment extends ToolbarFragment implements OnBackPressedLis emojiBtn=view.findViewById(R.id.btn_emoji); spoilerBtn=view.findViewById(R.id.btn_spoiler); visibilityBtn=view.findViewById(R.id.btn_visibility); + replyText=view.findViewById(R.id.reply_text); mediaBtn.setOnClickListener(v->openFilePicker()); emojiBtn.setOnClickListener(v->emojiKeyboard.toggleKeyboardPopup(mainEditText)); @@ -207,6 +218,23 @@ public class ComposeFragment extends ToolbarFragment implements OnBackPressedLis } }); updateToolbar(); + if(replyTo!=null){ + replyText.setText(getString(R.string.in_reply_to, replyTo.account.displayName)); + ArrayList mentions=new ArrayList<>(); + mentions.add('@'+replyTo.account.acct); + for(Mention mention : replyTo.mentions){ + String m='@'+mention.acct; + if(!mentions.contains(m)) + mentions.add(m); + } + initialReplyMentions=TextUtils.join(" ", mentions)+" "; + if(savedInstanceState==null){ + mainEditText.setText(initialReplyMentions); + mainEditText.setSelection(mainEditText.length()); + } + }else{ + replyText.setVisibility(View.GONE); + } } @Override @@ -277,6 +305,9 @@ public class ComposeFragment extends ToolbarFragment implements OnBackPressedLis if(!attachments.isEmpty()){ req.mediaIds=attachments.stream().map(a->a.serverAttachment.id).collect(Collectors.toList()); } + if(replyTo!=null){ + req.inReplyToId=replyTo.id; + } String uuid=UUID.randomUUID().toString(); ProgressDialog progress=new ProgressDialog(getActivity()); progress.setMessage(getString(R.string.publishing)); @@ -289,6 +320,8 @@ public class ComposeFragment extends ToolbarFragment implements OnBackPressedLis progress.dismiss(); Nav.finish(ComposeFragment.this); E.post(new StatusCreatedEvent(result)); + replyTo.repliesCount++; + E.post(new StatusCountersUpdatedEvent(replyTo)); } @Override @@ -301,7 +334,8 @@ public class ComposeFragment extends ToolbarFragment implements OnBackPressedLis } private boolean hasDraft(){ - return mainEditText.length()>0; + return (mainEditText.length()>0 && !mainEditText.getText().toString().equals(initialReplyMentions)) || !attachments.isEmpty() + || uploadingAttachment!=null || !queuedAttachments.isEmpty() || !failedAttachments.isEmpty(); } @Override diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/NotificationsFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/NotificationsFragment.java index 8971c445..f9b2fc69 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/NotificationsFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/NotificationsFragment.java @@ -23,7 +23,7 @@ public class NotificationsFragment extends BaseStatusListFragment{ @Override protected List buildDisplayItems(Notification n){ - ReblogOrReplyLineStatusDisplayItem titleItem=new ReblogOrReplyLineStatusDisplayItem(n.id, switch(n.type){ + ReblogOrReplyLineStatusDisplayItem titleItem=new ReblogOrReplyLineStatusDisplayItem(n.id, this, switch(n.type){ case FOLLOW -> getString(R.string.user_followed_you, n.account.displayName); case FOLLOW_REQUEST -> getString(R.string.user_sent_follow_request, n.account.displayName); case MENTION -> getString(R.string.user_mentioned_you, n.account.displayName); diff --git a/mastodon/src/main/java/org/joinmastodon/android/model/Application.java b/mastodon/src/main/java/org/joinmastodon/android/model/Application.java index 8f837afe..04661481 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/model/Application.java +++ b/mastodon/src/main/java/org/joinmastodon/android/model/Application.java @@ -1,7 +1,9 @@ package org.joinmastodon.android.model; import org.joinmastodon.android.api.RequiredField; +import org.parceler.Parcel; +@Parcel public class Application extends BaseModel{ @RequiredField public String name; diff --git a/mastodon/src/main/java/org/joinmastodon/android/model/Attachment.java b/mastodon/src/main/java/org/joinmastodon/android/model/Attachment.java index 7af27d89..131f8742 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/model/Attachment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/model/Attachment.java @@ -10,7 +10,9 @@ import org.joinmastodon.android.api.ObjectValidationException; import org.joinmastodon.android.api.RequiredField; import org.joinmastodon.android.ui.utils.BlurHashDecoder; import org.joinmastodon.android.ui.utils.BlurHashDrawable; +import org.parceler.Parcel; +@Parcel public class Attachment extends BaseModel{ @RequiredField public String id; @@ -88,6 +90,7 @@ public class Attachment extends BaseModel{ UNKNOWN } + @Parcel public static class Metadata{ public double duration; public int width; @@ -111,6 +114,7 @@ public class Attachment extends BaseModel{ } } + @Parcel public static class SizeMetadata{ public int width; public int height; diff --git a/mastodon/src/main/java/org/joinmastodon/android/model/Card.java b/mastodon/src/main/java/org/joinmastodon/android/model/Card.java index 402d137e..0c98eb1a 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/model/Card.java +++ b/mastodon/src/main/java/org/joinmastodon/android/model/Card.java @@ -9,7 +9,9 @@ import org.joinmastodon.android.api.ObjectValidationException; import org.joinmastodon.android.api.RequiredField; import org.joinmastodon.android.ui.utils.BlurHashDecoder; import org.joinmastodon.android.ui.utils.BlurHashDrawable; +import org.parceler.Parcel; +@Parcel public class Card extends BaseModel{ @RequiredField public String url; diff --git a/mastodon/src/main/java/org/joinmastodon/android/model/Hashtag.java b/mastodon/src/main/java/org/joinmastodon/android/model/Hashtag.java index 97f585ce..77d90f9a 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/model/Hashtag.java +++ b/mastodon/src/main/java/org/joinmastodon/android/model/Hashtag.java @@ -1,9 +1,11 @@ package org.joinmastodon.android.model; import org.joinmastodon.android.api.RequiredField; +import org.parceler.Parcel; import java.util.List; +@Parcel public class Hashtag extends BaseModel{ @RequiredField public String name; diff --git a/mastodon/src/main/java/org/joinmastodon/android/model/History.java b/mastodon/src/main/java/org/joinmastodon/android/model/History.java index 30f692a5..61e22962 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/model/History.java +++ b/mastodon/src/main/java/org/joinmastodon/android/model/History.java @@ -1,8 +1,10 @@ package org.joinmastodon.android.model; import org.joinmastodon.android.api.AllFieldsAreRequired; +import org.parceler.Parcel; @AllFieldsAreRequired +@Parcel public class History extends BaseModel{ public long day; // unixtime public int uses; diff --git a/mastodon/src/main/java/org/joinmastodon/android/model/Mention.java b/mastodon/src/main/java/org/joinmastodon/android/model/Mention.java index c64299e6..3b20bb71 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/model/Mention.java +++ b/mastodon/src/main/java/org/joinmastodon/android/model/Mention.java @@ -1,8 +1,10 @@ package org.joinmastodon.android.model; import org.joinmastodon.android.api.AllFieldsAreRequired; +import org.parceler.Parcel; @AllFieldsAreRequired +@Parcel public class Mention extends BaseModel{ public String id; public String username; diff --git a/mastodon/src/main/java/org/joinmastodon/android/model/Poll.java b/mastodon/src/main/java/org/joinmastodon/android/model/Poll.java index f5a252c1..1706db58 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/model/Poll.java +++ b/mastodon/src/main/java/org/joinmastodon/android/model/Poll.java @@ -2,12 +2,14 @@ package org.joinmastodon.android.model; import org.joinmastodon.android.api.AllFieldsAreRequired; import org.joinmastodon.android.api.ObjectValidationException; +import org.parceler.Parcel; import java.time.Instant; import java.util.Arrays; import java.util.List; @AllFieldsAreRequired +@Parcel public class Poll extends BaseModel{ public String id; public Instant expiresAt; @@ -41,6 +43,7 @@ public class Poll extends BaseModel{ '}'; } + @Parcel public static class Option{ public String title; public Integer votesCount; diff --git a/mastodon/src/main/java/org/joinmastodon/android/model/Status.java b/mastodon/src/main/java/org/joinmastodon/android/model/Status.java index 1fed0ae7..3c58fd91 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/model/Status.java +++ b/mastodon/src/main/java/org/joinmastodon/android/model/Status.java @@ -3,10 +3,12 @@ package org.joinmastodon.android.model; import org.joinmastodon.android.api.ObjectValidationException; import org.joinmastodon.android.api.RequiredField; import org.joinmastodon.android.events.StatusCountersUpdatedEvent; +import org.parceler.Parcel; import java.time.Instant; import java.util.List; +@Parcel public class Status extends BaseModel implements DisplayItemsParent{ @RequiredField public String id; @@ -116,6 +118,7 @@ public class Status extends BaseModel implements DisplayItemsParent{ public void update(StatusCountersUpdatedEvent ev){ favouritesCount=ev.favorites; reblogsCount=ev.reblogs; + repliesCount=ev.replies; favourited=ev.favorited; reblogged=ev.reblogged; } diff --git a/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/FooterStatusDisplayItem.java b/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/FooterStatusDisplayItem.java index a6c69af4..c9fa1465 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/FooterStatusDisplayItem.java +++ b/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/FooterStatusDisplayItem.java @@ -2,8 +2,8 @@ package org.joinmastodon.android.ui.displayitems; import android.app.Activity; import android.content.Intent; -import android.content.res.ColorStateList; import android.os.Build; +import android.os.Bundle; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; @@ -11,12 +11,16 @@ import android.widget.TextView; import org.joinmastodon.android.R; import org.joinmastodon.android.api.session.AccountSessionManager; +import org.joinmastodon.android.fragments.BaseStatusListFragment; +import org.joinmastodon.android.fragments.ComposeFragment; import org.joinmastodon.android.model.Status; import org.joinmastodon.android.model.StatusPrivacy; import org.joinmastodon.android.ui.utils.UiUtils; +import org.parceler.Parcels; import java.text.DecimalFormat; +import me.grishka.appkit.Nav; import me.grishka.appkit.utils.BindableViewHolder; import me.grishka.appkit.utils.V; @@ -24,8 +28,8 @@ public class FooterStatusDisplayItem extends StatusDisplayItem{ public final Status status; private final String accountID; - public FooterStatusDisplayItem(String parentID, Status status, String accountID){ - super(parentID); + public FooterStatusDisplayItem(String parentID, BaseStatusListFragment parentFragment, Status status, String accountID){ + super(parentID, parentFragment); this.status=status; this.accountID=accountID; } @@ -78,7 +82,10 @@ public class FooterStatusDisplayItem extends StatusDisplayItem{ } private void onReplyClick(View v){ - + Bundle args=new Bundle(); + args.putString("account", item.accountID); + args.putParcelable("replyTo", Parcels.wrap(item.status)); + Nav.go(item.parentFragment.getActivity(), ComposeFragment.class, args); } private void onBoostClick(View v){ diff --git a/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/HeaderStatusDisplayItem.java b/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/HeaderStatusDisplayItem.java index e5a6bfd5..e6e51dca 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/HeaderStatusDisplayItem.java +++ b/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/HeaderStatusDisplayItem.java @@ -13,6 +13,7 @@ import android.widget.ImageView; import android.widget.TextView; import org.joinmastodon.android.R; +import org.joinmastodon.android.fragments.BaseStatusListFragment; import org.joinmastodon.android.fragments.ProfileFragment; import org.joinmastodon.android.model.Account; import org.joinmastodon.android.ui.utils.UiUtils; @@ -34,8 +35,8 @@ public class HeaderStatusDisplayItem extends StatusDisplayItem{ private Fragment parentFragment; private String accountID; - public HeaderStatusDisplayItem(String parentID, Account user, Instant createdAt, Fragment parentFragment, String accountID){ - super(parentID); + public HeaderStatusDisplayItem(String parentID, Account user, Instant createdAt, BaseStatusListFragment parentFragment, String accountID){ + super(parentID, parentFragment); this.user=user; this.createdAt=createdAt; avaRequest=new UrlImageLoaderRequest(user.avatar); diff --git a/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/PhotoStatusDisplayItem.java b/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/PhotoStatusDisplayItem.java index 409f7888..d4c986ef 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/PhotoStatusDisplayItem.java +++ b/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/PhotoStatusDisplayItem.java @@ -8,6 +8,7 @@ import android.view.ViewGroup; import android.widget.ImageView; import org.joinmastodon.android.R; +import org.joinmastodon.android.fragments.BaseStatusListFragment; import org.joinmastodon.android.model.Attachment; import org.joinmastodon.android.model.Status; import org.joinmastodon.android.ui.photoviewer.PhotoViewerHost; @@ -23,8 +24,8 @@ public class PhotoStatusDisplayItem extends StatusDisplayItem{ private Fragment parentFragment; private Status status; public final int index, totalPhotos; - public PhotoStatusDisplayItem(String parentID, Status status, Attachment photo, Fragment parentFragment, int index, int totalPhotos){ - super(parentID); + public PhotoStatusDisplayItem(String parentID, Status status, Attachment photo, BaseStatusListFragment parentFragment, int index, int totalPhotos){ + super(parentID, parentFragment); this.status=status; this.attachment=photo; request=new UrlImageLoaderRequest(photo.url, 1000, 1000); diff --git a/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/ReblogOrReplyLineStatusDisplayItem.java b/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/ReblogOrReplyLineStatusDisplayItem.java index b48df959..582bcf3f 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/ReblogOrReplyLineStatusDisplayItem.java +++ b/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/ReblogOrReplyLineStatusDisplayItem.java @@ -6,6 +6,7 @@ import android.view.ViewGroup; import android.widget.TextView; import org.joinmastodon.android.R; +import org.joinmastodon.android.fragments.BaseStatusListFragment; import org.joinmastodon.android.ui.utils.UiUtils; import me.grishka.appkit.utils.BindableViewHolder; @@ -13,8 +14,8 @@ import me.grishka.appkit.utils.BindableViewHolder; public class ReblogOrReplyLineStatusDisplayItem extends StatusDisplayItem{ private CharSequence text; - public ReblogOrReplyLineStatusDisplayItem(String parentID, CharSequence text){ - super(parentID); + public ReblogOrReplyLineStatusDisplayItem(String parentID, BaseStatusListFragment parentFragment, CharSequence text){ + super(parentID, parentFragment); this.text=text; } diff --git a/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/StatusDisplayItem.java b/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/StatusDisplayItem.java index 974f2d3b..0b9dfa76 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/StatusDisplayItem.java +++ b/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/StatusDisplayItem.java @@ -6,6 +6,7 @@ import android.text.TextUtils; import android.view.ViewGroup; import org.joinmastodon.android.R; +import org.joinmastodon.android.fragments.BaseStatusListFragment; import org.joinmastodon.android.model.Attachment; import org.joinmastodon.android.model.DisplayItemsParent; import org.joinmastodon.android.model.Status; @@ -18,9 +19,11 @@ import me.grishka.appkit.utils.BindableViewHolder; public abstract class StatusDisplayItem{ public final String parentID; + public final BaseStatusListFragment parentFragment; - public StatusDisplayItem(String parentID){ + public StatusDisplayItem(String parentID, BaseStatusListFragment parentFragment){ this.parentID=parentID; + this.parentFragment=parentFragment; } public abstract Type getType(); @@ -44,12 +47,12 @@ public abstract class StatusDisplayItem{ }; } - public static ArrayList buildItems(Fragment fragment, Status status, String accountID, DisplayItemsParent parentObject){ + public static ArrayList buildItems(BaseStatusListFragment fragment, Status status, String accountID, DisplayItemsParent parentObject){ String parentID=parentObject.getID(); ArrayList items=new ArrayList<>(); Status statusForContent=status.getContentStatus(); if(status.reblog!=null){ - items.add(new ReblogOrReplyLineStatusDisplayItem(parentID, fragment.getString(R.string.user_boosted, status.account.displayName))); + items.add(new ReblogOrReplyLineStatusDisplayItem(parentID, fragment, fragment.getString(R.string.user_boosted, status.account.displayName))); } items.add(new HeaderStatusDisplayItem(parentID, statusForContent.account, statusForContent.createdAt, fragment, accountID)); if(!TextUtils.isEmpty(statusForContent.content)) @@ -67,7 +70,7 @@ public abstract class StatusDisplayItem{ photoIndex++; } } - items.add(new FooterStatusDisplayItem(parentID, statusForContent, accountID)); + items.add(new FooterStatusDisplayItem(parentID, fragment, statusForContent, accountID)); return items; } diff --git a/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/TextStatusDisplayItem.java b/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/TextStatusDisplayItem.java index 66a12d11..7606a1f0 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/TextStatusDisplayItem.java +++ b/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/TextStatusDisplayItem.java @@ -9,7 +9,7 @@ import android.view.ViewGroup; import android.widget.Toast; import org.joinmastodon.android.R; -import org.joinmastodon.android.model.Status; +import org.joinmastodon.android.fragments.BaseStatusListFragment; import org.joinmastodon.android.ui.text.CustomEmojiSpan; import org.joinmastodon.android.ui.text.LinkSpan; import org.joinmastodon.android.ui.utils.UiUtils; @@ -26,8 +26,8 @@ public class TextStatusDisplayItem extends StatusDisplayItem implements LinkSpan private CharSequence text; private ImageLoaderRequest[] emojiRequests; private Fragment parentFragment; - public TextStatusDisplayItem(String parentID, CharSequence text, Fragment parentFragment){ - super(parentID); + public TextStatusDisplayItem(String parentID, CharSequence text, BaseStatusListFragment parentFragment){ + super(parentID, parentFragment); this.text=text; this.parentFragment=parentFragment; if(text instanceof Spanned){ diff --git a/mastodon/src/main/res/drawable/ic_fluent_arrow_reply_20_filled.xml b/mastodon/src/main/res/drawable/ic_fluent_arrow_reply_20_filled.xml new file mode 100644 index 00000000..2856fc17 --- /dev/null +++ b/mastodon/src/main/res/drawable/ic_fluent_arrow_reply_20_filled.xml @@ -0,0 +1,3 @@ + + + diff --git a/mastodon/src/main/res/layout/fragment_compose.xml b/mastodon/src/main/res/layout/fragment_compose.xml index 8efe4cf6..c7baefdc 100644 --- a/mastodon/src/main/res/layout/fragment_compose.xml +++ b/mastodon/src/main/res/layout/fragment_compose.xml @@ -16,6 +16,20 @@ android:layout_height="wrap_content" android:orientation="vertical"> + + Preparing for authentication… Finishing authentication… %s boosted - Replied to %s + In reply to %s Notifications %s followed you