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

View File

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