mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2026-11-24 02:51:34 -08:00
33 lines
956 B
Kotlin
33 lines
956 B
Kotlin
package com.kunzisoft.keepass.viewmodels
|
|
|
|
import androidx.lifecycle.MutableLiveData
|
|
import androidx.lifecycle.ViewModel
|
|
import com.kunzisoft.keepass.database.element.icon.IconImageCustom
|
|
import com.kunzisoft.keepass.database.element.icon.IconImageStandard
|
|
|
|
class IconPickerViewModel: ViewModel() {
|
|
|
|
val iconStandardSelected: MutableLiveData<IconImageStandard> by lazy {
|
|
MutableLiveData<IconImageStandard>()
|
|
}
|
|
|
|
val iconCustomSelected: MutableLiveData<IconImageCustom> by lazy {
|
|
MutableLiveData<IconImageCustom>()
|
|
}
|
|
|
|
val iconCustomAdded: MutableLiveData<IconImageCustom> by lazy {
|
|
MutableLiveData<IconImageCustom>()
|
|
}
|
|
|
|
fun selectIconStandard(icon: IconImageStandard) {
|
|
iconStandardSelected.value = icon
|
|
}
|
|
|
|
fun selectIconCustom(icon: IconImageCustom) {
|
|
iconCustomSelected.value = icon
|
|
}
|
|
|
|
fun addCustomIcon(icon: IconImageCustom) {
|
|
iconCustomAdded.value = icon
|
|
}
|
|
} |