fix spelling of property name in ChatViewModel

Signed-off-by: Christian Reiner <foss@christian-reiner.info>
This commit is contained in:
Christian Reiner 2024-10-31 17:19:19 +01:00
parent d9bcf14696
commit 315e263d31
2 changed files with 9 additions and 9 deletions

View file

@ -141,12 +141,12 @@ class ChatViewModel @Inject constructor(
val getReminderExistState: LiveData<ViewState>
get() = _getReminderExistState
object NoteToSelfNotAvaliableState : ViewState
open class NoteToSelfAvaliableState(val roomToken: String) : ViewState
object NoteToSelfNotAvailableState : ViewState
open class NoteToSelfAvailableState(val roomToken: String) : ViewState
private val _getNoteToSelfAvaliability: MutableLiveData<ViewState> = MutableLiveData(NoteToSelfNotAvaliableState)
val getNoteToSelfAvaliability: LiveData<ViewState>
get() = _getNoteToSelfAvaliability
private val _getNoteToSelfAvailability: MutableLiveData<ViewState> = MutableLiveData(NoteToSelfNotAvailableState)
val getNoteToSelfAvailability: LiveData<ViewState>
get() = _getNoteToSelfAvailability
object GetRoomStartState : ViewState
object GetRoomErrorState : ViewState
@ -732,9 +732,9 @@ class ChatViewModel @Inject constructor(
val model = ConversationModel.mapToConversationModel(it, userProvider.currentUser.blockingGet())
ConversationUtils.isNoteToSelfConversation(model)
}
_getNoteToSelfAvaliability.value = NoteToSelfAvaliableState(noteToSelf.token!!)
_getNoteToSelfAvailability.value = NoteToSelfAvailableState(noteToSelf.token!!)
} catch (e: NoSuchElementException) {
_getNoteToSelfAvaliability.value = NoteToSelfNotAvaliableState
_getNoteToSelfAvailability.value = NoteToSelfNotAvailableState
Log.e(TAG, "Note to self not found $e")
}
}

View file

@ -120,9 +120,9 @@ class MessageActionsDialog(
),
false
)
chatActivity.chatViewModel.getNoteToSelfAvaliability.observe(this) { state ->
chatActivity.chatViewModel.getNoteToSelfAvailability.observe(this) { state ->
when (state) {
is ChatViewModel.NoteToSelfAvaliableState -> {
is ChatViewModel.NoteToSelfAvailableState -> {
initMenuAddToNote(
!message.isDeleted && !ConversationUtils.isNoteToSelfConversation(currentConversation),
state.roomToken