Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-client-android
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-client-android
Commits
578b2aef
Commit
578b2aef
authored
10 months ago
by
Alexander Lussier-Cullen
Committed by
Sébastien Blin
10 months ago
Browse files
Options
Downloads
Patches
Plain Diff
ConversationMediaGalleryAdapter: add generic file info
GitLab:
#1653
Change-Id: I53754f4dc9ad0113db3fb1bc7339f31cec9eb0d8
parent
8d15c570
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
jami-android/app/src/main/java/cx/ring/adapters/ConversationMediaGalleryAdapter.kt
+8
-3
8 additions, 3 deletions
.../java/cx/ring/adapters/ConversationMediaGalleryAdapter.kt
with
8 additions
and
3 deletions
jami-android/app/src/main/java/cx/ring/adapters/ConversationMediaGalleryAdapter.kt
+
8
−
3
View file @
578b2aef
...
...
@@ -216,6 +216,12 @@ class ConversationMediaGalleryAdapter(
player
.
seekTo
(
1
)
}
private
fun
configureFile
(
viewHolder
:
ConversationMediaViewHolder
,
file
:
DataTransfer
)
{
val
fileBinding
=
viewHolder
.
file
?:
return
fileBinding
.
name
.
text
=
file
.
body
fileBinding
.
size
.
text
=
Formatter
.
formatFileSize
(
fileBinding
.
root
.
context
,
file
.
totalSize
)
}
private
fun
configureForFileInfo
(
viewHolder
:
ConversationMediaViewHolder
,
file
:
DataTransfer
,
position
:
Int
)
{
Log
.
w
(
TAG
,
"configureForFileInfo $position"
)
val
path
=
deviceRuntimeService
.
getConversationPath
(
file
)
...
...
@@ -224,11 +230,10 @@ class ConversationMediaGalleryAdapter(
file
.
isPicture
->
configureImage
(
viewHolder
.
image
!!
,
path
,
file
.
body
!!
)
file
.
isAudio
->
configureAudio
(
viewHolder
,
path
)
file
.
isVideo
->
configureVideo
(
viewHolder
,
path
)
else
->
configureFile
(
viewHolder
,
file
)
}
}
else
{
val
fileBinding
=
viewHolder
.
file
?:
return
fileBinding
.
name
.
text
=
file
.
body
fileBinding
.
size
.
text
=
Formatter
.
formatFileSize
(
fileBinding
.
root
.
context
,
file
.
totalSize
)
configureFile
(
viewHolder
,
file
)
Log
.
w
(
TAG
,
"configureForFileInfo not complete"
)
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment