mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-22 05:38:55 +00:00
smol fixes
This commit is contained in:
parent
fc96c6146e
commit
19c125a690
5 changed files with 15 additions and 9 deletions
|
|
@ -10,6 +10,7 @@
|
|||
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
|
||||
<uses-permission android:name="com.android.vending.BILLING" />
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
|
||||
<uses-permission android:name="com.google.android.gms.permission.AD_ID"/>
|
||||
|
||||
<application
|
||||
android:name=".HabiticaApplication"
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ import android.widget.LinearLayout
|
|||
import android.widget.ProgressBar
|
||||
import android.widget.TextView
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.habitrpg.android.habitica.R
|
||||
import com.habitrpg.android.habitica.helpers.AssignedTextProvider
|
||||
import com.habitrpg.android.habitica.helpers.ExceptionHandler
|
||||
|
|
@ -47,7 +46,7 @@ abstract class BaseTaskViewHolder constructor(
|
|||
var isLocked = false
|
||||
protected var context: Context
|
||||
private val mainTaskWrapper: ViewGroup = itemView.findViewById(R.id.main_task_wrapper)
|
||||
protected val assignedTextView: EllipsisTextView = itemView.findViewById(R.id.assigned_textview)
|
||||
protected val assignedTextView: TextView = itemView.findViewById(R.id.assigned_textview)
|
||||
protected val titleTextView: EllipsisTextView = itemView.findViewById(R.id.checkedTextView)
|
||||
protected val notesTextView: EllipsisTextView? = itemView.findViewById(R.id.notesTextView)
|
||||
protected val calendarIconView: ImageView? = itemView.findViewById(R.id.iconViewCalendar)
|
||||
|
|
@ -254,7 +253,7 @@ abstract class BaseTaskViewHolder constructor(
|
|||
approvalRequiredTextView.visibility = View.GONE
|
||||
}
|
||||
|
||||
if (data.group?.assignedUsers?.isEmpty() != false) {
|
||||
if (data.group?.assignedUsers?.isNotEmpty() == true) {
|
||||
assignedTextView.text = assignedTextProvider?.textForTask(context.resources, data.group?.assignedUsers ?: emptyList())
|
||||
assignedTextView.visibility = View.VISIBLE
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -314,9 +314,13 @@ class TasksViewModel : BaseViewModel(), AssignedTextProvider {
|
|||
|
||||
override fun textForTask(resources: Resources, assignedUsers: List<String>): 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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
NAME=4.0.3
|
||||
CODE=4561
|
||||
CODE=4571
|
||||
Loading…
Reference in a new issue