Fix color in lollipop and remove unnecessary otp counter

This commit is contained in:
J-Jamet
2021-08-29 16:44:19 +02:00
parent 8385d55d69
commit 6a2cda74f1
4 changed files with 0 additions and 12 deletions

View File

@@ -415,14 +415,12 @@ class NodeAdapter (private val context: Context,
private fun populateOtpView(holder: NodeViewHolder?, otpElement: OtpElement?) { private fun populateOtpView(holder: NodeViewHolder?, otpElement: OtpElement?) {
when (otpElement?.type) { when (otpElement?.type) {
OtpType.HOTP -> { OtpType.HOTP -> {
holder?.otpCounter?.text = otpElement.counter.toString()
holder?.otpProgress?.apply { holder?.otpProgress?.apply {
max = 100 max = 100
progress = 100 progress = 100
} }
} }
OtpType.TOTP -> { OtpType.TOTP -> {
holder?.otpCounter?.text = otpElement.secondsRemaining.toString()
holder?.otpProgress?.apply { holder?.otpProgress?.apply {
max = otpElement.period max = otpElement.period
progress = otpElement.secondsRemaining progress = otpElement.secondsRemaining
@@ -474,7 +472,6 @@ class NodeAdapter (private val context: Context,
var meta: TextView = itemView.findViewById(R.id.node_meta) var meta: TextView = itemView.findViewById(R.id.node_meta)
var otpContainer: ViewGroup? = itemView.findViewById(R.id.node_otp_container) var otpContainer: ViewGroup? = itemView.findViewById(R.id.node_otp_container)
var otpProgress: ProgressBar? = itemView.findViewById(R.id.node_otp_progress) var otpProgress: ProgressBar? = itemView.findViewById(R.id.node_otp_progress)
var otpCounter: TextView? = itemView.findViewById(R.id.node_otp_counter)
var otpToken: TextView? = itemView.findViewById(R.id.node_otp_token) var otpToken: TextView? = itemView.findViewById(R.id.node_otp_token)
var otpRunnable: OtpRunnable = OtpRunnable(otpContainer) var otpRunnable: OtpRunnable = OtpRunnable(otpContainer)
var numberChildren: TextView? = itemView.findViewById(R.id.node_child_numbers) var numberChildren: TextView? = itemView.findViewById(R.id.node_child_numbers)

View File

@@ -146,15 +146,6 @@
android:layout_gravity="center" android:layout_gravity="center"
android:max="100" android:max="100"
android:progress="60" /> android:progress="60" />
<TextView
android:id="@+id/node_otp_counter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
style="@style/KeepassDXStyle.TextAppearance.Entry.Info"
android:textSize="11sp"
tools:text="70" />
</FrameLayout> </FrameLayout>
</LinearLayout> </LinearLayout>