Skip to content

Commit

Permalink
extract string resource
Browse files Browse the repository at this point in the history
Signed-off-by: Felix Nüsse <felix.nuesse@t-online.de>
  • Loading branch information
newhinton authored and backportbot-nextcloud[bot] committed Nov 23, 2022
1 parent e9f51a7 commit 482b9a1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/src/main/java/com/nextcloud/utils/ShortcutUtil.kt
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,10 @@ class ShortcutUtil @Inject constructor(private val mContext: Context) {
MimeTypeUtil.getFileTypeIconId(file.mimeType, file.fileName)
)
}
val longLabel = mContext.getString(R.string.pin_shortcut_label, file.fileName)
val pinShortcutInfo = ShortcutInfoCompat.Builder(mContext, shortcutId)
.setShortLabel(file.fileName)
.setLongLabel("Open " + file.fileName)
.setLongLabel(longLabel)
.setIcon(icon)
.setIntent(intent)
.build()
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1055,4 +1055,5 @@
<string name="e2e_not_yet_setup">E2E not yet setup</string>
<string name="error_file_actions">Error showing file actions</string>
<string name="pin_home">Pin to Home screen</string>
<string name="pin_shortcut_label">Open %1$s</string>
</resources>

0 comments on commit 482b9a1

Please sign in to comment.