fixed bug

This commit is contained in:
shuchi
2022-09-13 18:10:54 +05:30
parent 2fb8d06f0b
commit f02c99349b
3 changed files with 10 additions and 5 deletions

View File

@@ -110,10 +110,10 @@ class AttachmentPickerViewModel(application: Application) : AndroidViewModel(app
}
fun isSupportedFile(extension: String) =
(extension == FileHelper.JPG_EXTENSION || extension == FileHelper.JPEG_EXTENSION ||
extension == FileHelper.PNG_EXTENSION || extension == FileHelper.PDF_EXTENSION ||
extension == FileHelper.MP4_EXTENSION || extension == FileHelper.DOC_EXTENSION ||
extension == FileHelper.DOCX_EXTENSION)
(extension.equals(FileHelper.JPG_EXTENSION, true) || extension.equals(FileHelper.JPEG_EXTENSION, true) ||
extension.equals(FileHelper.PNG_EXTENSION, true) || extension.equals(FileHelper.PDF_EXTENSION, true) ||
extension.equals(FileHelper.MP4_EXTENSION, true) || extension.equals(FileHelper.DOC_EXTENSION, true) ||
extension.equals(FileHelper.DOCX_EXTENSION, true))
fun setPdfPickerData(data: Intent?, fileName: String?) {
viewModelScope.launch(dispatcher.main) {

View File

@@ -116,6 +116,9 @@ class NaviChatReceivedMessageWithAttachmentLayout @JvmOverloads constructor(
DOWNLOADING_STATE -> {
tvReceivedMessage.progressImage.setBackgroundResource(R.drawable.ic_downloading)
tvReceivedMessage.progressState.progress = ProgressBar.VISIBLE
tvReceivedMessage.progressImage.setOnClickListener {
//no op
}
}
else -> {}
}

View File

@@ -110,7 +110,6 @@ class NaviChatSentMessageWithAttachmentLayout @JvmOverloads constructor(
)
}
}
}
DOWNLOAD_STATE, FAILED_STATE -> {
tvSentMessage.progressImage.setBackgroundResource(R.drawable.ic_download)
@@ -133,6 +132,9 @@ class NaviChatSentMessageWithAttachmentLayout @JvmOverloads constructor(
DOWNLOADING_STATE -> {
tvSentMessage.progressImage.setBackgroundResource(R.drawable.ic_downloading)
tvSentMessage.progressState.progress = ProgressBar.VISIBLE
tvSentMessage.progressImage.setOnClickListener {
//no op
}
}
}
}