Skip to content

Commit

Permalink
fix: someshit
Browse files Browse the repository at this point in the history
  • Loading branch information
aayush2622 committed Mar 5, 2024
1 parent 120e63e commit 36c6495
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 14 deletions.
1 change: 0 additions & 1 deletion app/src/main/java/ani/dantotsu/media/CalendarActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ class CalendarActivity : AppCompatActivity() {
)
binding.settingsContainer.updateLayoutParams<ViewGroup.MarginLayoutParams> {
topMargin = statusBarHeight
bottomMargin = navBarHeight
}
}
setContentView(binding.root)
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/ani/dantotsu/profile/ProfileActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class ProfileActivity : AppCompatActivity() {
})
val userLevel = intent.getStringExtra("username") ?: ""
binding.followButton.visibility = if (user.id == Anilist.userid || Anilist.userid == null) View.GONE else View.VISIBLE
binding.followButton.text = if (user.isFollowing) "Unfollow" else "Follow"
binding.followButton.text = if (user.isFollowing) "Unfollow" else if(user.isFollower) "Follows you" else "Follow"
if (user.isFollowing && user.isFollower) binding.followButton.text = "Mutual"
binding.followButton.setOnClickListener {
lifecycleScope.launch(Dispatchers.IO) {
Expand All @@ -90,7 +90,7 @@ class ProfileActivity : AppCompatActivity() {
withContext(Dispatchers.Main) {
snackString("Success")
user.isFollowing = res.data.toggleFollow.isFollowing
binding.followButton.text = if (user.isFollowing) "Unfollow" else "Follow"
binding.followButton.text = if (user.isFollowing) "Unfollow" else if(user.isFollower) "Follows you" else "Follow"
if (user.isFollowing && user.isFollower) binding.followButton.text = "Mutual"
}
}
Expand Down
15 changes: 6 additions & 9 deletions app/src/main/res/layout/activity_profile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
android:id="@+id/profileUserDataContainer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="-124dp"
android:layout_marginTop="-171dp"
android:layout_gravity="center"
android:orientation="vertical"
tools:visibility="visible">
Expand Down Expand Up @@ -81,6 +81,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_gravity="center"
android:textColor="?attr/colorPrimary"
android:fontFamily="@font/poppins_semi_bold"
android:text="@string/username"
Expand All @@ -91,21 +92,17 @@
style="@style/Widget.Material3.Button.OutlinedButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:enabled="true"
android:layout_gravity="center"
android:fontFamily="@font/poppins_bold"
android:insetTop="0dp"
android:insetBottom="0dp"
android:padding="8dp"
android:textColor="@color/bg_opp"
android:text="Follow"
android:textSize="16sp"
app:cornerRadius="16dp"
android:textSize="14sp"
android:backgroundTint="?attr/colorPrimaryContainer"
app:cornerRadius="8dp"
app:strokeColor="?attr/colorPrimaryContainer"
tools:ignore="SpeakableTextPresentCheck" />



</LinearLayout>

<androidx.viewpager2.widget.ViewPager2
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/layout/item_anime_watch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:layout_marginEnd="32dp"
android:layout_marginStart="32dp"
android:backgroundTint="@color/yt_red"
android:fontFamily="@font/poppins_bold"
android:insetTop="0dp"
Expand Down

0 comments on commit 36c6495

Please sign in to comment.