Show the follower's bio/note in a "followed you" notification (#3281)

This makes the notification view for a follow request contain more info about the new follower, and makes the layout (of their name / username) consistent with other notifications that show names/usernames.
This commit is contained in:
Nik Clayton 2023-04-24 12:09:34 +02:00 committed by GitHub
commit f1b3faf85f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 35 additions and 7 deletions

View file

@ -56,6 +56,7 @@ class BottomSheetActivityTest {
localUsername = "admin",
username = "admin",
displayName = "Ad Min",
note = "This is their bio",
url = "http://mastodon.foo.bar/@User",
avatar = ""
)

View file

@ -100,6 +100,7 @@ class MainActivityTest {
localUsername = "connyduck",
username = "connyduck@mastodon.example",
displayName = "Conny Duck",
note = "This is their bio",
url = "https://mastodon.example/@ConnyDuck",
avatar = "https://mastodon.example/system/accounts/avatars/000/150/486/original/ab27d7ddd18a10ea.jpg"
),

View file

@ -33,8 +33,8 @@ class StatusComparisonTest {
}
@Test
fun `accounts with different notes in json - should be equal because notes are not relevant for timelines`() {
assertEquals(createStatus(note = "Test"), createStatus(note = "Test 123456"))
fun `accounts with different notes in json - should not be equal`() {
assertNotEquals(createStatus(note = "Test"), createStatus(note = "Test 123456"))
}
private val gson = Gson()

View file

@ -5,7 +5,6 @@ import com.keylesspalace.tusky.db.TimelineStatusWithAccount
import com.keylesspalace.tusky.entity.Status
import com.keylesspalace.tusky.entity.TimelineAccount
import com.keylesspalace.tusky.viewdata.StatusViewData
import java.util.ArrayList
import java.util.Date
private val fixedDate = Date(1638889052000)
@ -26,6 +25,7 @@ fun mockStatus(
localUsername = "connyduck",
username = "connyduck@mastodon.example",
displayName = "Conny Duck",
note = "This is their bio",
url = "https://mastodon.example/@ConnyDuck",
avatar = "https://mastodon.example/system/accounts/avatars/000/150/486/original/ab27d7ddd18a10ea.jpg"
),