diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/CachedRichTextParser.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/CachedRichTextParser.kt index 553b26d3e..2ac35e33c 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/CachedRichTextParser.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/CachedRichTextParser.kt @@ -26,11 +26,9 @@ import com.vitorpamplona.amethyst.commons.richtext.RichTextViewerState import com.vitorpamplona.quartz.events.ImmutableListOfLists object CachedRichTextParser { - val richTextCache = LruCache(50) + private val richTextCache = LruCache(50) - // fun getCached(content: String): RichTextViewerState? = richTextCache[content] - - fun hashCodeCache( + private fun hashCodeCache( content: String, tags: ImmutableListOfLists, callbackUri: String?, diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/ProfileScreen.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/ProfileScreen.kt index 57b0a481b..a6aeb7f03 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/ProfileScreen.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/ProfileScreen.kt @@ -954,7 +954,7 @@ fun WatchIsHiddenUser( fun getIdentityClaimIcon(identity: IdentityClaim): Int = when (identity) { - is TwitterIdentity -> R.drawable.twitter + is TwitterIdentity -> R.drawable.x is TelegramIdentity -> R.drawable.telegram is MastodonIdentity -> R.drawable.mastodon is GitHubIdentity -> R.drawable.github diff --git a/amethyst/src/main/res/drawable/x.xml b/amethyst/src/main/res/drawable/x.xml new file mode 100644 index 000000000..39aa7a6d8 --- /dev/null +++ b/amethyst/src/main/res/drawable/x.xml @@ -0,0 +1,9 @@ + + + \ No newline at end of file diff --git a/amethyst/src/main/res/values/strings.xml b/amethyst/src/main/res/values/strings.xml index 4745ce130..d204eeeda 100644 --- a/amethyst/src/main/res/values/strings.xml +++ b/amethyst/src/main/res/values/strings.xml @@ -250,11 +250,11 @@ Github Gist w/ Proof Telegram Mastodon Post ID w/ Proof - Twitter Status w/ Proof + X Status w/ Proof https://gist.github.com/<user>/<gist> https://t.me/<proof post> https://<server>/<user>/<proof post> - https://twitter.com/<user>/status/<proof post> + https://x.com/<user>/status/<proof post> "<Unable to decrypt private message>\n\nYou were cited in a private/encrypted conversation between %1$s and %2$s." Add New Account Accounts diff --git a/quartz/src/main/java/com/vitorpamplona/quartz/events/MetadataEvent.kt b/quartz/src/main/java/com/vitorpamplona/quartz/events/MetadataEvent.kt index b0af7212e..7237426e9 100644 --- a/quartz/src/main/java/com/vitorpamplona/quartz/events/MetadataEvent.kt +++ b/quartz/src/main/java/com/vitorpamplona/quartz/events/MetadataEvent.kt @@ -87,7 +87,7 @@ class TwitterIdentity( identity: String, proof: String, ) : IdentityClaim(identity, proof) { - override fun toProofUrl() = "https://twitter.com/$identity/status/$proof" + override fun toProofUrl() = "https://x.com/$identity/status/$proof" override fun platform() = platform @@ -97,7 +97,7 @@ class TwitterIdentity( fun parseProofUrl(proofUrl: String): TwitterIdentity? { return try { if (proofUrl.isBlank()) return null - val path = proofUrl.removePrefix("https://twitter.com/").split("?")[0].split("/") + val path = proofUrl.removePrefix("https://x.com/").split("?")[0].split("/") TwitterIdentity(path[0], path[2]) } catch (e: Exception) {