Fixed usernames and post scroll
This commit is contained in:
parent
4af74c7432
commit
9b628120d5
@ -99,7 +99,7 @@ class DrawerMenuTest {
|
|||||||
onView(withText("ete2")).perform(ViewActions.click())
|
onView(withText("ete2")).perform(ViewActions.click())
|
||||||
Thread.sleep(1000)
|
Thread.sleep(1000)
|
||||||
|
|
||||||
onView(withId(R.id.accountNameTextView)).check(matches(withText("ete2")))
|
onView(withId(R.id.accountNameTextView)).check(matches(withText("Christian")))
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -114,6 +114,6 @@ class DrawerMenuTest {
|
|||||||
onView(withText("Dobios")).perform(ViewActions.click())
|
onView(withText("Dobios")).perform(ViewActions.click())
|
||||||
Thread.sleep(1000)
|
Thread.sleep(1000)
|
||||||
|
|
||||||
onView(withId(R.id.accountNameTextView)).check(matches(withText("Dobios")))
|
onView(withId(R.id.accountNameTextView)).check(matches(withText("Andrew Dobis")))
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -90,7 +90,7 @@ class MockedServerTest {
|
|||||||
onView(withText("ete2")).perform((ViewActions.click()))
|
onView(withText("ete2")).perform((ViewActions.click()))
|
||||||
Thread.sleep(1000)
|
Thread.sleep(1000)
|
||||||
|
|
||||||
onView(withId(R.id.accountNameTextView)).check(matches(withText("ete2")))
|
onView(withId(R.id.accountNameTextView)).check(matches(withText("Christian")))
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -136,7 +136,7 @@ class MockedServerTest {
|
|||||||
|
|
||||||
onView(withText("Dobios followed you")).perform(ViewActions.click())
|
onView(withText("Dobios followed you")).perform(ViewActions.click())
|
||||||
Thread.sleep(1000)
|
Thread.sleep(1000)
|
||||||
onView(withText("Dobios")).check(matches(withId(R.id.accountNameTextView)))
|
onView(withText("Andrew Dobis")).check(matches(withId(R.id.accountNameTextView)))
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -81,7 +81,7 @@ class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelecte
|
|||||||
// Set profile picture
|
// Set profile picture
|
||||||
val avatar = findViewById<ImageView>(R.id.drawer_avatar)
|
val avatar = findViewById<ImageView>(R.id.drawer_avatar)
|
||||||
ImageConverter.setRoundImageFromURL(
|
ImageConverter.setRoundImageFromURL(
|
||||||
View(applicationContext), account.avatar, avatar)
|
View(applicationContext), account.avatar_static, avatar)
|
||||||
avatar.setOnClickListener{ launchActivity(ProfileActivity()) }
|
avatar.setOnClickListener{ launchActivity(ProfileActivity()) }
|
||||||
|
|
||||||
// Set account name
|
// Set account name
|
||||||
|
@ -103,7 +103,7 @@ class ProfileActivity : AppCompatActivity() {
|
|||||||
description.text = account!!.note
|
description.text = account!!.note
|
||||||
|
|
||||||
val accountName = findViewById<TextView>(R.id.accountNameTextView)
|
val accountName = findViewById<TextView>(R.id.accountNameTextView)
|
||||||
accountName.text = account!!.username
|
accountName.text = account!!.display_name
|
||||||
accountName.setTypeface(null, Typeface.BOLD)
|
accountName.setTypeface(null, Typeface.BOLD)
|
||||||
|
|
||||||
val nbPosts = findViewById<TextView>(R.id.nbPostsTextView)
|
val nbPosts = findViewById<TextView>(R.id.nbPostsTextView)
|
||||||
|
@ -99,9 +99,9 @@ data class Status(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun getUsername() : CharSequence {
|
fun getUsername() : CharSequence {
|
||||||
var name = account.display_name
|
var name = account.username
|
||||||
if (name.isEmpty()) {
|
if (name.isEmpty()) {
|
||||||
name = account.username
|
name = account.display_name
|
||||||
}
|
}
|
||||||
return name
|
return name
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,10 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<ScrollView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -219,6 +223,8 @@
|
|||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
</ScrollView>
|
||||||
|
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user