fixed bug
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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 -> {}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user