support glitch react notification

This commit is contained in:
sk 2023-04-22 19:00:37 +02:00
parent 63e536c66c
commit 60ea7cedf6
3 changed files with 9 additions and 6 deletions

View File

@ -19,7 +19,6 @@ import org.joinmastodon.android.model.CacheablePaginatedResponse;
import org.joinmastodon.android.model.Emoji;
import org.joinmastodon.android.model.Filter;
import org.joinmastodon.android.model.Notification;
import org.joinmastodon.android.model.PaginatedResponse;
import org.joinmastodon.android.model.Status;
import org.joinmastodon.android.ui.displayitems.AccountCardStatusDisplayItem;
import org.joinmastodon.android.ui.displayitems.HeaderStatusDisplayItem;
@ -102,7 +101,8 @@ public class NotificationsListFragment extends BaseStatusListFragment<Notificati
case UPDATE -> getString(R.string.sk_post_edited);
case SIGN_UP -> getString(R.string.sk_signed_up);
case REPORT -> getString(R.string.sk_reported);
case EMOJI_REACTION -> getString(R.string.sk_reacted, n.emoji);
case REACTION, PLEROMA_EMOJI_REACTION ->
n.emojiUrl != null ? getString(R.string.sk_reacted_with, n.emoji) : getString(R.string.sk_reacted);
};
HeaderStatusDisplayItem titleItem=extraText!=null ? new HeaderStatusDisplayItem(n.id, n.account, n.createdAt, this, accountID, n.status, n.emojiUrl!=null ? HtmlParser.parseCustomEmoji(extraText, Collections.singletonList(emoji)) : extraText, n, null) : null;
if(n.status!=null){

View File

@ -53,12 +53,14 @@ public class Notification extends BaseModel implements DisplayItemsParent{
STATUS,
@SerializedName("update")
UPDATE,
@SerializedName("reaction")
REACTION,
@SerializedName("pleroma:emoji_reaction")
PLEROMA_EMOJI_REACTION,
@SerializedName("admin.sign_up")
SIGN_UP,
@SerializedName("admin.report")
REPORT,
@SerializedName("pleroma:emoji_reaction")
EMOJI_REACTION
REPORT
}
@Parcel

View File

@ -252,7 +252,8 @@
<string name="sk_settings_glitch_mode_explanation">Enable this if your home instance runs on Glitch. Not needed for Hometown or Akkoma.</string>
<string name="sk_signed_up">signed up</string>
<string name="sk_reported">reported</string>
<string name="sk_reacted">reacted with %s</string>
<string name="sk_reacted_with">reacted with %s</string>
<string name="sk_reacted">reacted</string>
<string name="sk_sign_ups">Users signing up</string>
<string name="sk_new_reports">New reports</string>
<string name="sk_settings_server_version">Server version: %s</string>