mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2025-12-04 15:49:33 +01:00
Fix color in lollipop and remove unnecessary otp counter
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user