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
47106322
Commit
47106322
authored
Jul 11, 2018
by
Filipe de Lima Brito
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix project compilation.
parent
064485e3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
+5
-7
Attachment.kt
...c/main/java/chat/rocket/android/chatroom/ui/Attachment.kt
+2
-5
ChatRoomFragment.kt
.../java/chat/rocket/android/chatroom/ui/ChatRoomFragment.kt
+3
-2
No files found.
app/src/main/java/chat/rocket/android/chatroom/ui/Attachment.kt
View file @
47106322
...
@@ -9,6 +9,7 @@ import chat.rocket.android.util.extensions.getMimeType
...
@@ -9,6 +9,7 @@ import chat.rocket.android.util.extensions.getMimeType
fun
ChatRoomFragment
.
showFileAttachmentDialog
(
uri
:
Uri
)
{
fun
ChatRoomFragment
.
showFileAttachmentDialog
(
uri
:
Uri
)
{
activity
?.
let
{
fragmentActivity
->
activity
?.
let
{
fragmentActivity
->
uri
.
getMimeType
(
fragmentActivity
).
let
{
mimeType
->
uri
.
getMimeType
(
fragmentActivity
).
let
{
mimeType
->
description
.
text
.
clear
()
when
{
when
{
mimeType
.
startsWith
(
"image"
)
->
{
mimeType
.
startsWith
(
"image"
)
->
{
imagePreview
.
isVisible
=
true
imagePreview
.
isVisible
=
true
...
@@ -27,16 +28,14 @@ fun ChatRoomFragment.showFileAttachmentDialog(uri: Uri) {
...
@@ -27,16 +28,14 @@ fun ChatRoomFragment.showFileAttachmentDialog(uri: Uri) {
sendButton
.
setOnClickListener
{
sendButton
.
setOnClickListener
{
presenter
.
uploadFile
(
chatRoomId
,
uri
,
(
citation
?:
""
)
+
description
.
text
.
toString
())
presenter
.
uploadFile
(
chatRoomId
,
uri
,
(
citation
?:
""
)
+
description
.
text
.
toString
())
clearMessageComposition
()
alertDialog
.
dismiss
()
alertDialog
.
dismiss
()
}
}
cancelButton
.
setOnClickListener
{
alertDialog
.
dismiss
()
}
cancelButton
.
setOnClickListener
{
alertDialog
.
dismiss
()
}
alertDialog
.
show
()
alertDialog
.
show
()
}
}
fun
ChatRoomFragment
.
showDrawAttachmentDialog
(
byteArray
:
ByteArray
)
{
fun
ChatRoomFragment
.
showDrawAttachmentDialog
(
byteArray
:
ByteArray
)
{
description
.
text
.
clear
()
imagePreview
.
isVisible
=
true
imagePreview
.
isVisible
=
true
imagePreview
.
setImageDrawable
(
Drawable
.
createFromStream
(
byteArray
.
inputStream
(),
""
))
imagePreview
.
setImageDrawable
(
Drawable
.
createFromStream
(
byteArray
.
inputStream
(),
""
))
...
@@ -46,11 +45,9 @@ fun ChatRoomFragment.showDrawAttachmentDialog(byteArray: ByteArray) {
...
@@ -46,11 +45,9 @@ fun ChatRoomFragment.showDrawAttachmentDialog(byteArray: ByteArray) {
byteArray
,
byteArray
,
(
citation
?:
""
)
+
description
.
text
.
toString
()
(
citation
?:
""
)
+
description
.
text
.
toString
()
)
)
clearMessageComposition
()
alertDialog
.
dismiss
()
alertDialog
.
dismiss
()
}
}
cancelButton
.
setOnClickListener
{
alertDialog
.
dismiss
()
}
cancelButton
.
setOnClickListener
{
alertDialog
.
dismiss
()
}
alertDialog
.
show
()
alertDialog
.
show
()
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/chatroom/ui/ChatRoomFragment.kt
View file @
47106322
...
@@ -547,8 +547,9 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
...
@@ -547,8 +547,9 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
ui
{
ui
{
citation
=
null
citation
=
null
editingMessageId
=
null
editingMessageId
=
null
if
(
deleteMessage
)
if
(
deleteMessage
)
{
text_message
.
textContent
=
""
text_message
.
textContent
=
""
}
actionSnackbar
.
dismiss
()
actionSnackbar
.
dismiss
()
}
}
}
}
...
...
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