diff --git a/listview/src/main/kotlin/com/alfresco/content/listview/ListViewMessage.kt b/listview/src/main/kotlin/com/alfresco/content/listview/ListViewMessage.kt index 80e91ead..3aac0932 100644 --- a/listview/src/main/kotlin/com/alfresco/content/listview/ListViewMessage.kt +++ b/listview/src/main/kotlin/com/alfresco/content/listview/ListViewMessage.kt @@ -33,4 +33,9 @@ class ListViewMessage @JvmOverloads constructor( fun setMessage(@StringRes stringRes: Int) { binding.message.text = resources.getText(stringRes) } + + @ModelProp + fun setMessage(stringRes: String) { + binding.message.text = stringRes + } } diff --git a/process-app/src/main/kotlin/com/alfresco/content/process/ui/fragments/ProcessAttachFilesFragment.kt b/process-app/src/main/kotlin/com/alfresco/content/process/ui/fragments/ProcessAttachFilesFragment.kt index 68d5cf48..963e9d36 100644 --- a/process-app/src/main/kotlin/com/alfresco/content/process/ui/fragments/ProcessAttachFilesFragment.kt +++ b/process-app/src/main/kotlin/com/alfresco/content/process/ui/fragments/ProcessAttachFilesFragment.kt @@ -12,6 +12,7 @@ import com.airbnb.epoxy.AsyncEpoxyController import com.airbnb.mvrx.MavericksView import com.airbnb.mvrx.fragmentViewModel import com.airbnb.mvrx.withState +import com.alfresco.content.GetMultipleContents import com.alfresco.content.actions.ActionOpenWith import com.alfresco.content.common.EntryListener import com.alfresco.content.data.AnalyticsManager @@ -87,7 +88,7 @@ class ProcessAttachFilesFragment : ProcessBaseFragment(), MavericksView, EntryLi val filesHeader = StringBuilder() filesHeader.append(getString(R.string.text_multiple_attachment, state.listContents.size)) .append("\n") - .append(getString(R.string.process_max_file_size)) + .append(getString(R.string.process_max_file_size, GetMultipleContents.MAX_FILE_SIZE_10)) binding.tvNoOfAttachments.text = filesHeader } else { binding.tvNoOfAttachments.visibility = View.GONE diff --git a/process-app/src/main/kotlin/com/alfresco/content/process/ui/fragments/ProcessAttachFilesViewModel.kt b/process-app/src/main/kotlin/com/alfresco/content/process/ui/fragments/ProcessAttachFilesViewModel.kt index 31f870ec..bc93eebc 100644 --- a/process-app/src/main/kotlin/com/alfresco/content/process/ui/fragments/ProcessAttachFilesViewModel.kt +++ b/process-app/src/main/kotlin/com/alfresco/content/process/ui/fragments/ProcessAttachFilesViewModel.kt @@ -5,6 +5,7 @@ import com.airbnb.mvrx.MavericksViewModel import com.airbnb.mvrx.MavericksViewModelFactory import com.airbnb.mvrx.Success import com.airbnb.mvrx.ViewModelContext +import com.alfresco.content.GetMultipleContents import com.alfresco.content.actions.Action import com.alfresco.content.actions.ActionOpenWith import com.alfresco.content.common.EntryListener @@ -85,7 +86,7 @@ class ProcessAttachFilesViewModel( fun emptyMessageArgs(state: ProcessAttachFilesViewState) = when { else -> - Triple(R.drawable.ic_empty_files, R.string.no_attached_files, R.string.file_empty_message) + Triple(R.drawable.ic_empty_files, R.string.no_attached_files, context.getString(R.string.file_empty_message, GetMultipleContents.MAX_FILE_SIZE_10)) } /** diff --git a/process-app/src/main/res/values/strings.xml b/process-app/src/main/res/values/strings.xml index bbc70100..d703b5f6 100644 --- a/process-app/src/main/res/values/strings.xml +++ b/process-app/src/main/res/values/strings.xml @@ -13,9 +13,9 @@ No Folder Attached %d folder(s) Info - Looks like you haven’t\nadded any files yet\n(Max file size: 10 MB). + Looks like you haven’t\nadded any files yet\n(Max file size: %d MB). Search Folder %1$s has Invalid URL Not able to attach the selected content in this form. - Please note: Maximum file size for uploads is 10 MB. + Please note: Maximum file size for uploads is %d MB.