Skip to content

Commit

Permalink
review correction
Browse files Browse the repository at this point in the history
  • Loading branch information
aman-alfresco committed May 13, 2024
1 parent e117f4c commit 76ba8c3
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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))
}

/**
Expand Down
4 changes: 2 additions & 2 deletions process-app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
<string name="no_attached_folder">No Folder Attached</string>
<string name="text_attached_folder">%d folder(s)</string>
<string name="action_info">Info</string>
<string name="file_empty_message">Looks like you haven’t\nadded any files yet\n(Max file size: 10 MB).</string>
<string name="file_empty_message">Looks like you haven’t\nadded any files yet\n(Max file size: %d MB).</string>
<string name="title_search_folder">Search Folder</string>
<string name="error_hyperlink_invalid_url">%1$s has Invalid URL</string>
<string name="error_no_upload_fields">Not able to attach the selected content in this form.</string>
<string name="process_max_file_size">Please note: Maximum file size for uploads is 10 MB.</string>
<string name="process_max_file_size">Please note: Maximum file size for uploads is %d MB.</string>
</resources>

0 comments on commit 76ba8c3

Please sign in to comment.