Use accountId (= uri) for Notestock to fix test
This commit is contained in:
parent
c028c0f1f6
commit
72d5753d75
|
@ -185,7 +185,6 @@ abstract class BottomSheetActivity : BaseActivity() {
|
|||
// https://friendica.foo.bar/display/d4643c42-3ae0-4b73-b8b0-c725f5819207
|
||||
// https://misskey.foo.bar/notes/83w6r388br (always lowercase)
|
||||
// https://mastodon.foo.bar/users/User/statuses/000000000000000000
|
||||
// username@example.com
|
||||
fun looksLikeMastodonUrl(urlString: String): Boolean {
|
||||
val uri: URI
|
||||
try {
|
||||
|
@ -209,8 +208,7 @@ fun looksLikeMastodonUrl(urlString: String): Boolean {
|
|||
path.matches("^/notes/[a-z0-9]+$".toRegex()) ||
|
||||
path.matches("^/display/[-a-f0-9]+$".toRegex()) ||
|
||||
path.matches("^/profile/\\w+$".toRegex()) ||
|
||||
path.matches("^/users/[^/]+/statuses/[0-9]+$".toRegex()) ||
|
||||
path.matches("^[^@]+@[^@]+$".toRegex())
|
||||
path.matches("^/users/[^/]+/statuses/\\d+$".toRegex())
|
||||
}
|
||||
|
||||
enum class PostLookupFallbackBehavior {
|
||||
|
|
|
@ -702,7 +702,7 @@ public abstract class StatusBaseViewHolder extends RecyclerView.ViewHolder {
|
|||
|
||||
avatar.setOnClickListener(v -> {
|
||||
if (isNotestock) {
|
||||
listener.onViewUrl(acct, acct);
|
||||
listener.onViewUrl(accountId, accountId);
|
||||
} else {
|
||||
listener.onViewAccount(accountId);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue