Skip to content
This repository was archived by the owner on May 23, 2025. It is now read-only.
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,12 @@ public void setupWithStatus(@NonNull StatusViewData.Concrete status,
boolean hasStatusInfo = rebloggingStatus != null | isReplyOnly;

TimelineAccount statusInfoAccount = rebloggingStatus != null ? rebloggingStatus.getAccount() : status.getRepliedToAccount();
Status.Visibility statusVisibility = rebloggingStatus != null ? rebloggingStatus.getVisibility() : status.getStatus().getVisibility();

if (!hasStatusInfo) {
hideStatusInfo();
} else {
setStatusInfoContent(statusInfoAccount, isReplyOnly, isReplySelf, statusDisplayOptions);
setStatusInfoContent(statusInfoAccount, statusVisibility, isReplyOnly, isReplySelf, statusDisplayOptions);
}

if (isReplyOnly) {
Expand All @@ -103,6 +104,7 @@ public void setupWithStatus(@NonNull StatusViewData.Concrete status,
}

private void setStatusInfoContent(final TimelineAccount account,
final Status.Visibility statusVisibility,
final boolean isReply,
final boolean isSelfReply,
final StatusDisplayOptions statusDisplayOptions) {
Expand All @@ -112,7 +114,17 @@ private void setStatusInfoContent(final TimelineAccount account,
CharSequence translatedText = "";

if (!isReply) {
translatedText = context.getString(R.string.post_boosted_format, wrappedName);
int format;
if (statusVisibility == Status.Visibility.PUBLIC) {
format = R.string.post_boosted_format;
} else if (statusVisibility == Status.Visibility.UNLISTED) {
format = R.string.post_boosted_unlisted_format;
} else if (statusVisibility == Status.Visibility.PRIVATE) {
format = R.string.post_boosted_private_format;
} else {
format = R.string.post_boosted_format;
}
translatedText = context.getString(format, wrappedName);
} else if (isSelfReply) {
translatedText = context.getString(R.string.post_replied_self);
} else {
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@

<string name="post_username_format">\@%1$s</string>
<string name="post_boosted_format">%1$s boosted</string>
<string name="post_boosted_unlisted_format">%1$s boosted (Unlisted)</string>
<string name="post_boosted_private_format">%1$s boosted (Followers-Only)</string>
Comment on lines +88 to +89
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure about those strings

I suggest also:

Suggested change
<string name="post_boosted_unlisted_format">%1$s boosted (Unlisted)</string>
<string name="post_boosted_private_format">%1$s boosted (Followers-Only)</string>
<string name="post_boosted_unlisted_format">%1$s quietly boosted</string>
<string name="post_boosted_private_format">%1$s privately boosted</string>

<string name="post_replied">Replied</string>
<string name="post_replied_format">In reply to %1$s</string>
<string name="post_replied_self">Continued thread</string>
Expand Down