Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
This commit is contained in:
sowjanyakch 2025-04-24 12:08:05 +02:00
parent 9155c4ca69
commit 98adab723b
No known key found for this signature in database
GPG Key ID: F7AA2A8B65B50220
3 changed files with 1 additions and 27 deletions

View File

@ -256,8 +256,6 @@ class ChatActivity :
lateinit var chatViewModel: ChatViewModel lateinit var chatViewModel: ChatViewModel
lateinit var messageInputViewModel: MessageInputViewModel lateinit var messageInputViewModel: MessageInputViewModel
private lateinit var noteToSelfRoomToken: String
private val startSelectContactForResult = registerForActivityResult( private val startSelectContactForResult = registerForActivityResult(
ActivityResultContracts ActivityResultContracts
.StartActivityForResult() .StartActivityForResult()
@ -642,27 +640,6 @@ class ChatActivity :
} }
} }
chatViewModel.noteToSelfViewState.observe(this) { state ->
when (state) {
is ChatViewModel.NoteToSelfErrorState -> {
Snackbar.make(binding.root, "Unable to send message to note to self", Snackbar.LENGTH_LONG).show()
}
ChatViewModel.NoteToSelfStartState -> {
}
is ChatViewModel.NoteToSelfSuccessState -> {
val roomOverall = state.roomOverall
noteToSelfRoomToken = roomOverall.ocs?.data?.token!!
}
is ChatViewModel.NoteToSelfNotAvailableState -> {
}
else -> {
}
}
}
chatViewModel.joinRoomViewState.observe(this) { state -> chatViewModel.joinRoomViewState.observe(this) { state ->
when (state) { when (state) {
is ChatViewModel.JoinRoomSuccessState -> { is ChatViewModel.JoinRoomSuccessState -> {

View File

@ -557,7 +557,7 @@ class ChatViewModel @Inject constructor(
} }
override fun onError(e: Throwable) { override fun onError(e: Throwable) {
Log.e(TAG, "Error when sharing location to notes $e") Log.e(TAG, "Error when getting note to self room $e")
_noteToSelfViewState.value = NoteToSelfErrorState(e.localizedMessage ?: "") _noteToSelfViewState.value = NoteToSelfErrorState(e.localizedMessage ?: "")
} }

View File

@ -192,9 +192,6 @@ class MessageActionsDialog(
noteToSelfRoomToken = roomOverall.ocs?.data?.token!! noteToSelfRoomToken = roomOverall.ocs?.data?.token!!
} }
is ChatViewModel.NoteToSelfNotAvailableState -> {
}
else -> { else -> {
} }
} }