Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AloqaIM-Android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
AloqaIM-Android
Commits
75719076
Unverified
Commit
75719076
authored
May 28, 2018
by
Rafael Kellermann Streit
Committed by
GitHub
May 28, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1318 from RocketChat/fix/download-button
[FIX] Download button.
parents
df033e7d
234f1a7c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
10 deletions
+4
-10
ImageAttachmentViewHolder.kt
...ket/android/chatroom/adapter/ImageAttachmentViewHolder.kt
+1
-1
FilesFragment.kt
...c/main/java/chat/rocket/android/files/ui/FilesFragment.kt
+2
-6
ImageHelper.kt
app/src/main/java/chat/rocket/android/helper/ImageHelper.kt
+0
-3
fragment_files.xml
app/src/main/res/layout/fragment_files.xml
+1
-0
No files found.
app/src/main/java/chat/rocket/android/chatroom/adapter/ImageAttachmentViewHolder.kt
View file @
75719076
...
...
@@ -30,7 +30,7 @@ class ImageAttachmentViewHolder(
file_name
.
text
=
data
.
attachmentTitle
image_attachment
.
setOnClickListener
{
ImageHelper
.
openImage
(
it
.
context
,
context
,
data
.
attachmentUrl
,
data
.
attachmentTitle
.
toString
()
)
...
...
app/src/main/java/chat/rocket/android/files/ui/FilesFragment.kt
View file @
75719076
...
...
@@ -94,17 +94,13 @@ class FilesFragment : Fragment(), FilesView {
override
fun
playMedia
(
url
:
String
)
{
ui
{
activity
?.
let
{
PlayerActivity
.
play
(
it
,
url
)
}
PlayerActivity
.
play
(
it
,
url
)
}
}
override
fun
openImage
(
url
:
String
,
name
:
String
)
{
ui
{
activity
?.
let
{
ImageHelper
.
openImage
(
it
,
url
,
name
)
}
ImageHelper
.
openImage
(
root_layout
.
context
,
url
,
name
)
}
}
...
...
app/src/main/java/chat/rocket/android/helper/ImageHelper.kt
View file @
75719076
...
...
@@ -53,7 +53,6 @@ object ImageHelper {
)
val
toolbar
=
Toolbar
(
context
).
also
{
it
.
inflateMenu
(
R
.
menu
.
image_actions
)
it
.
overflowIcon
?.
setTint
(
Color
.
WHITE
)
it
.
setOnMenuItemClickListener
{
return
@setOnMenuItemClickListener
when
(
it
.
itemId
)
{
R
.
id
.
action_save_image
->
saveImage
(
context
)
...
...
@@ -109,7 +108,6 @@ object ImageHelper {
.
hideStatusBar
(
false
)
.
setCustomDraweeControllerBuilder
(
builder
)
.
show
()
}
private
fun
saveImage
(
context
:
Context
):
Boolean
{
...
...
@@ -166,5 +164,4 @@ object ImageHelper {
)
}
}
}
\ No newline at end of file
app/src/main/res/layout/fragment_files.xml
View file @
75719076
...
...
@@ -2,6 +2,7 @@
<android.support.constraint.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:id=
"@+id/root_layout"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
tools:context=
".files.ui.FilesFragment"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment