From 2ef3da3d38a982308dac7f6fa2cba04371f221a1 Mon Sep 17 00:00:00 2001 From: Bnyro Date: Mon, 15 Apr 2024 14:04:34 +0200 Subject: [PATCH] fix: thumbnail time defaults in contribute to DeArrow dialog --- .../com/github/libretube/ui/dialogs/SubmitDeArrowDialog.kt | 4 ++-- app/src/main/res/layout/dialog_submit_dearrow.xml | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/github/libretube/ui/dialogs/SubmitDeArrowDialog.kt b/app/src/main/java/com/github/libretube/ui/dialogs/SubmitDeArrowDialog.kt index 407251cd0..d512a595a 100644 --- a/app/src/main/java/com/github/libretube/ui/dialogs/SubmitDeArrowDialog.kt +++ b/app/src/main/java/com/github/libretube/ui/dialogs/SubmitDeArrowDialog.kt @@ -22,7 +22,7 @@ import kotlinx.coroutines.withContext class SubmitDeArrowDialog: DialogFragment() { private var videoId: String = "" - private var currentPosition: Long = 0 + private var currentPosition: Float = 0f private var _binding: DialogSubmitDearrowBinding? = null private val binding get() = _binding!! @@ -31,7 +31,7 @@ class SubmitDeArrowDialog: DialogFragment() { super.onCreate(savedInstanceState) arguments?.let { videoId = it.getString(IntentData.videoId)!! - currentPosition = it.getLong(IntentData.currentPosition) + currentPosition = it.getLong(IntentData.currentPosition).toFloat() / 1000 } } diff --git a/app/src/main/res/layout/dialog_submit_dearrow.xml b/app/src/main/res/layout/dialog_submit_dearrow.xml index dee2d86ec..233650085 100644 --- a/app/src/main/res/layout/dialog_submit_dearrow.xml +++ b/app/src/main/res/layout/dialog_submit_dearrow.xml @@ -31,7 +31,7 @@ android:id="@+id/thumbnail_time_checkbox" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:checked="true" + android:checked="false" android:text="@string/thumbnail_time" /> @@ -53,6 +53,7 @@ android:id="@+id/thumbnail_time" android:layout_width="match_parent" android:layout_height="wrap_content" + android:enabled="false" android:inputType="numberDecimal" />