File tree Expand file tree Collapse file tree 3 files changed +13
-6
lines changed
features/cells/src/main/java/com/wire/android/feature/cells/ui Expand file tree Collapse file tree 3 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -78,10 +78,9 @@ internal fun CellListItem(
78
78
verticalAlignment = Alignment .CenterVertically ,
79
79
) {
80
80
81
- if (cell is CellNodeUi .File ) {
82
- FileIconPreview (cell)
83
- } else {
84
- FolderIconPreview ()
81
+ when (cell) {
82
+ is CellNodeUi .File -> FileIconPreview (cell)
83
+ is CellNodeUi .Folder -> FolderIconPreview (cell)
85
84
}
86
85
87
86
Column (
@@ -148,7 +147,7 @@ internal fun CellListItem(
148
147
}
149
148
150
149
@Composable
151
- internal fun FolderIconPreview () {
150
+ internal fun FolderIconPreview (cell : CellNodeUi . Folder ) {
152
151
Box (
153
152
modifier = Modifier
154
153
.size(dimensions().spacing56x),
@@ -159,6 +158,12 @@ internal fun FolderIconPreview() {
159
158
painter = painterResource(R .drawable.ic_folder_item),
160
159
contentDescription = null ,
161
160
)
161
+ cell.publicLinkId?.let {
162
+ PublicLinkIcon (
163
+ offsetX = dimensions().spacing12x,
164
+ offsetY = dimensions().spacing12x
165
+ )
166
+ }
162
167
}
163
168
}
164
169
Original file line number Diff line number Diff line change @@ -97,6 +97,7 @@ internal fun Node.Folder.toUiModel() = CellNodeUi.Folder(
97
97
remotePath = remotePath,
98
98
size = size,
99
99
tags = tags,
100
+ publicLinkId = publicLinkId,
100
101
)
101
102
102
103
private fun Node.File.formattedModifiedTime () = modifiedTime?.let {
Original file line number Diff line number Diff line change @@ -284,7 +284,7 @@ private fun RowItem(
284
284
) {
285
285
when (cell) {
286
286
is CellNodeUi .File -> FileIconPreview (cell)
287
- is CellNodeUi .Folder -> FolderIconPreview ()
287
+ is CellNodeUi .Folder -> FolderIconPreview (cell )
288
288
}
289
289
Text (
290
290
cell.name ? : " " ,
@@ -307,6 +307,7 @@ fun PreviewMoveToFolderItem() {
307
307
conversationName = " Conversation" ,
308
308
modifiedTime = null ,
309
309
size = 1234 ,
310
+ publicLinkId = " public"
310
311
)
311
312
)
312
313
}
You can’t perform that action at this time.
0 commit comments