commit 234fe2c2aa0ddfee086d8d9a5aa9dcc0eb2ce9b2
parent f0aa035f7cd470c0d97ee6ff48a5e004232e0398
Author: rhunk <101876869+rhunk@users.noreply.github.com>
Date: Tue, 23 Jan 2024 19:14:43 +0100
fix(core/ff_info_menu): friend link type & added date
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/core/src/main/kotlin/me/rhunk/snapenhance/core/ui/menu/impl/FriendFeedInfoMenu.kt b/core/src/main/kotlin/me/rhunk/snapenhance/core/ui/menu/impl/FriendFeedInfoMenu.kt
@@ -90,7 +90,7 @@ class FriendFeedInfoMenu : AbstractMenu() {
translation["first_created_username"] to profile.firstCreatedUsername,
translation["mutable_username"] to profile.mutableUsername,
translation["display_name"] to profile.displayName,
- translation["added_date"] to formatDate(addedTimestamp),
+ translation["added_date"] to formatDate(addedTimestamp).takeIf { addedTimestamp > 0 },
null to birthday.getDisplayName(
Calendar.MONTH,
Calendar.LONG,
@@ -103,6 +103,8 @@ class FriendFeedInfoMenu : AbstractMenu() {
},
translation["friendship"] to run {
context.translation["friendship_link_type.${FriendLinkType.fromValue(profile.friendLinkType).shortName}"]
+ }.takeIf {
+ if (profile.friendLinkType == FriendLinkType.MUTUAL.value) addedTimestamp.toInt() > 0 else true
},
translation["add_source"] to context.database.getAddSource(profile.userId!!)?.takeIf { it.isNotEmpty() },
translation["snapchat_plus"] to run {