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
46e490be
Commit
46e490be
authored
Jan 15, 2019
by
Filipe de Lima Brito
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removes useless function.
parent
74949a24
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
44 deletions
+2
-44
ChatRoomFragment.kt
.../java/chat/rocket/android/chatroom/ui/ChatRoomFragment.kt
+2
-3
Dialog.kt
app/src/main/java/chat/rocket/android/chatroom/ui/Dialog.kt
+0
-41
No files found.
app/src/main/java/chat/rocket/android/chatroom/ui/ChatRoomFragment.kt
View file @
46e490be
...
...
@@ -72,7 +72,6 @@ import chat.rocket.android.util.extensions.circularRevealOrUnreveal
import
chat.rocket.android.util.extensions.clearLightStatusBar
import
chat.rocket.android.util.extensions.fadeIn
import
chat.rocket.android.util.extensions.fadeOut
import
chat.rocket.android.util.extensions.getBitmpap
import
chat.rocket.android.util.extensions.hideKeyboard
import
chat.rocket.android.util.extensions.inflate
import
chat.rocket.android.util.extensions.isNotNullNorEmpty
...
...
@@ -345,8 +344,8 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
override
fun
onActivityResult
(
requestCode
:
Int
,
resultCode
:
Int
,
resultData
:
Intent
?)
{
if
(
resultCode
==
Activity
.
RESULT_OK
)
{
when
(
requestCode
)
{
REQUEST_CODE_FOR_PERFORM_CAMERA
->
takenPhotoUri
?.
let
{
uri
->
show
CameraImageAttachmentDialog
(
uri
)
REQUEST_CODE_FOR_PERFORM_CAMERA
->
takenPhotoUri
?.
let
{
show
FileAttachmentDialog
(
it
)
}
REQUEST_CODE_FOR_PERFORM_SAF
->
resultData
?.
data
?.
let
{
showFileAttachmentDialog
(
it
)
...
...
app/src/main/java/chat/rocket/android/chatroom/ui/Dialog.kt
View file @
46e490be
...
...
@@ -5,7 +5,6 @@ import android.graphics.drawable.Drawable
import
android.net.Uri
import
androidx.core.view.isVisible
import
chat.rocket.android.emoji.internal.GlideApp
import
chat.rocket.android.util.extensions.getBitmpap
import
chat.rocket.android.util.extensions.getFileName
import
chat.rocket.android.util.extensions.getMimeType
import
chat.rocket.common.util.ifNull
...
...
@@ -99,43 +98,3 @@ fun ChatRoomFragment.showDrawAttachmentDialog(byteArray: ByteArray) {
cancelButton
.
setOnClickListener
{
alertDialog
.
dismiss
()
}
alertDialog
.
show
()
}
fun
ChatRoomFragment
.
showCameraImageAttachmentDialog
(
uri
:
Uri
)
{
imagePreview
.
isVisible
=
false
audioVideoAttachment
.
isVisible
=
false
textFile
.
isVisible
=
false
activity
?.
let
{
context
->
description
.
text
.
clear
()
GlideApp
.
with
(
context
)
.
asBitmap
()
.
load
(
uri
)
.
fitCenter
()
.
into
(
object
:
SimpleTarget
<
Bitmap
>()
{
override
fun
onResourceReady
(
resource
:
Bitmap
,
transition
:
Transition
<
in
Bitmap
>?
)
{
imagePreview
.
setImageBitmap
(
resource
)
}
})
imagePreview
.
isVisible
=
true
}
sendButton
.
setOnClickListener
{
uri
.
getBitmpap
(
requireContext
())
?.
let
{
bitmap
->
presenter
.
uploadImage
(
chatRoomId
,
"image/png"
,
uri
,
bitmap
,
(
citation
?:
""
)
+
description
.
text
.
toString
())
}
alertDialog
.
dismiss
()
}
cancelButton
.
setOnClickListener
{
alertDialog
.
dismiss
()
}
alertDialog
.
show
()
}
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