mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-22 13:48:55 +00:00
fix some crashes
This commit is contained in:
parent
c5d55e05c8
commit
1274414018
2 changed files with 2 additions and 2 deletions
|
|
@ -255,7 +255,7 @@ class TaskFormActivity : BaseActivity() {
|
|||
}
|
||||
|
||||
private fun configureForm() {
|
||||
val firstDayOfWeek = sharedPreferences.getInt("FirstDayOfTheWeek", -1)
|
||||
val firstDayOfWeek = sharedPreferences.getString("FirstDayOfTheWeek", "-1")?.toInt() ?: -1
|
||||
val habitViewsVisibility = if (taskType == Task.TYPE_HABIT) View.VISIBLE else View.GONE
|
||||
binding.habitScoringButtons.visibility = habitViewsVisibility
|
||||
binding.habitResetStreakTitleView.visibility = habitViewsVisibility
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ class AvatarOverviewFragment : BaseMainFragment<FragmentAvatarOverviewBinding>()
|
|||
}
|
||||
}
|
||||
|
||||
override fun onItemSelected(parent: AdapterView<*>, view: View, position: Int, id: Long) {
|
||||
override fun onItemSelected(parent: AdapterView<*>, view: View?, position: Int, id: Long) {
|
||||
val newSize: String = if (position == 0) "slim" else "broad"
|
||||
|
||||
if (this.user?.isValid == true && this.user?.preferences?.size != newSize) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue