From 19c125a6902145dca34792b3e715d66b3e465294 Mon Sep 17 00:00:00 2001 From: Phillip Thelen Date: Tue, 27 Sep 2022 12:36:15 +0200 Subject: [PATCH] smol fixes --- Habitica/AndroidManifest.xml | 1 + .../habitica/ui/viewHolders/tasks/BaseTaskViewHolder.kt | 5 ++--- .../android/habitica/ui/viewmodels/TasksViewModel.kt | 8 ++++++-- .../ui/views/navigation/HabiticaBottomNavigationView.kt | 8 +++++--- version.properties | 2 +- 5 files changed, 15 insertions(+), 9 deletions(-) diff --git a/Habitica/AndroidManifest.xml b/Habitica/AndroidManifest.xml index 2ca257b22..a7bbc8380 100644 --- a/Habitica/AndroidManifest.xml +++ b/Habitica/AndroidManifest.xml @@ -10,6 +10,7 @@ + ): String { return if (assignedUsers.contains(userViewModel.userID)) { - resources.getQuantityString(R.plurals.you_x_others, assignedUsers.size - 1) + if (assignedUsers.size == 1) { + resources.getString(R.string.you) + } else { + resources.getQuantityString(R.plurals.you_x_others, assignedUsers.size - 1, assignedUsers.size - 1) + } } else { - resources.getQuantityString(R.plurals.people, assignedUsers.size) + resources.getQuantityString(R.plurals.people, assignedUsers.size, assignedUsers.size) } } } diff --git a/Habitica/src/main/java/com/habitrpg/android/habitica/ui/views/navigation/HabiticaBottomNavigationView.kt b/Habitica/src/main/java/com/habitrpg/android/habitica/ui/views/navigation/HabiticaBottomNavigationView.kt index e6dfa6468..d7e94af1f 100644 --- a/Habitica/src/main/java/com/habitrpg/android/habitica/ui/views/navigation/HabiticaBottomNavigationView.kt +++ b/Habitica/src/main/java/com/habitrpg/android/habitica/ui/views/navigation/HabiticaBottomNavigationView.kt @@ -16,9 +16,9 @@ import androidx.core.view.ViewCompat import androidx.core.view.children import com.habitrpg.android.habitica.R import com.habitrpg.android.habitica.databinding.MainNavigationViewBinding +import com.habitrpg.android.habitica.extensions.setTintWith import com.habitrpg.common.habitica.extensions.getThemeColor import com.habitrpg.common.habitica.extensions.layoutInflater -import com.habitrpg.android.habitica.extensions.setTintWith import com.habitrpg.shared.habitica.models.tasks.TaskType interface HabiticaBottomNavigationViewListener { @@ -69,7 +69,8 @@ class HabiticaBottomNavigationView @JvmOverloads constructor( val animator = ObjectAnimator.ofFloat(0f, 1.0f) if (field) { val params = binding.cutoutFill.layoutParams - params.height = binding.cutoutBackground.height + // add some additional height because otherwise there is a weird white line + params.height = binding.cutoutBackground.height + 10 binding.cutoutFill.layoutParams = params animator.addUpdateListener { val reversed = 1.0f - it.animatedFraction @@ -82,7 +83,8 @@ class HabiticaBottomNavigationView @JvmOverloads constructor( .setDuration(200) } else { val params = binding.cutoutFill.layoutParams - params.height = binding.cutoutBackground.height + // add some additional height because otherwise there is a weird white line + params.height = binding.cutoutBackground.height + 10 binding.cutoutFill.layoutParams = params animator.addUpdateListener { binding.cutoutFill.translationY = -it.animatedFraction * (binding.cutoutBackground.height) diff --git a/version.properties b/version.properties index 59fa6aff3..ce8608982 100644 --- a/version.properties +++ b/version.properties @@ -1,2 +1,2 @@ NAME=4.0.3 -CODE=4561 \ No newline at end of file +CODE=4571 \ No newline at end of file