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
507413e7
Unverified
Commit
507413e7
authored
Jan 15, 2019
by
Filipe de Lima Brito
Committed by
GitHub
Jan 15, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into i18n/chinese-translation
parents
d48b8b6e
9ecc0442
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
28 deletions
+32
-28
ChatRoomFragment.kt
.../java/chat/rocket/android/chatroom/ui/ChatRoomFragment.kt
+2
-2
Dialog.kt
app/src/main/java/chat/rocket/android/chatroom/ui/Dialog.kt
+6
-6
ChatRoomsFragment.kt
...ava/chat/rocket/android/chatrooms/ui/ChatRoomsFragment.kt
+11
-9
MainActivity.kt
...src/main/java/chat/rocket/android/main/ui/MainActivity.kt
+1
-1
ProfileFragment.kt
...in/java/chat/rocket/android/profile/ui/ProfileFragment.kt
+12
-10
No files found.
app/src/main/java/chat/rocket/android/chatroom/ui/ChatRoomFragment.kt
View file @
507413e7
package
chat.rocket.android.chatroom.ui
import
android.app.Activity
import
android.app.AlertDialog
import
android
x.appcompat
.app.AlertDialog
import
android.content.ClipData
import
android.content.ClipboardManager
import
android.content.Context
...
...
@@ -200,7 +200,7 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
private
var
verticalScrollOffset
=
AtomicInteger
(
0
)
private
val
dialogView
by
lazy
{
View
.
inflate
(
context
,
R
.
layout
.
file_attachments_dialog
,
null
)
}
internal
val
alertDialog
by
lazy
{
AlertDialog
.
Builder
(
activity
).
setView
(
dialogView
).
create
()
}
internal
val
alertDialog
by
lazy
{
activity
?.
let
{
AlertDialog
.
Builder
(
it
).
setView
(
dialogView
).
create
()
}
}
internal
val
imagePreview
by
lazy
{
dialogView
.
findViewById
<
ImageView
>(
R
.
id
.
image_preview
)
}
internal
val
sendButton
by
lazy
{
dialogView
.
findViewById
<
android
.
widget
.
Button
>(
R
.
id
.
button_send
)
}
internal
val
cancelButton
by
lazy
{
dialogView
.
findViewById
<
android
.
widget
.
Button
>(
R
.
id
.
button_cancel
)
}
...
...
app/src/main/java/chat/rocket/android/chatroom/ui/Dialog.kt
View file @
507413e7
...
...
@@ -75,10 +75,10 @@ fun ChatRoomFragment.showFileAttachmentDialog(uri: Uri) {
(
citation
?:
""
)
+
description
.
text
.
toString
()
)
}
alertDialog
.
dismiss
()
alertDialog
?
.
dismiss
()
}
cancelButton
.
setOnClickListener
{
alertDialog
.
dismiss
()
}
alertDialog
.
show
()
cancelButton
.
setOnClickListener
{
alertDialog
?
.
dismiss
()
}
alertDialog
?
.
show
()
}
fun
ChatRoomFragment
.
showDrawAttachmentDialog
(
byteArray
:
ByteArray
)
{
...
...
@@ -92,9 +92,9 @@ fun ChatRoomFragment.showDrawAttachmentDialog(byteArray: ByteArray) {
byteArray
,
(
citation
?:
""
)
+
description
.
text
.
toString
()
)
alertDialog
.
dismiss
()
alertDialog
?
.
dismiss
()
}
cancelButton
.
setOnClickListener
{
alertDialog
.
dismiss
()
}
alertDialog
.
show
()
cancelButton
.
setOnClickListener
{
alertDialog
?
.
dismiss
()
}
alertDialog
?
.
show
()
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/chatrooms/ui/ChatRoomsFragment.kt
View file @
507413e7
package
chat.rocket.android.chatrooms.ui
import
android.app.AlertDialog
import
android
x.appcompat
.app.AlertDialog
import
android.app.ProgressDialog
import
android.os.Bundle
import
android.os.Handler
...
...
@@ -236,14 +236,16 @@ class ChatRoomsFragment : Fragment(), ChatRoomsView {
)
}
AlertDialog
.
Builder
(
context
)
.
setTitle
(
R
.
string
.
dialog_sort_title
)
.
setView
(
dialogLayout
)
.
setPositiveButton
(
R
.
string
.
msg_sort
)
{
dialog
,
_
->
invalidateQueryOnSearch
()
updateSort
()
dialog
.
dismiss
()
}.
show
()
context
?.
let
{
AlertDialog
.
Builder
(
it
)
.
setTitle
(
R
.
string
.
dialog_sort_title
)
.
setView
(
dialogLayout
)
.
setPositiveButton
(
R
.
string
.
msg_sort
)
{
dialog
,
_
->
invalidateQueryOnSearch
()
updateSort
()
dialog
.
dismiss
()
}.
show
()
}
}
}
return
super
.
onOptionsItemSelected
(
item
)
...
...
app/src/main/java/chat/rocket/android/main/ui/MainActivity.kt
View file @
507413e7
...
...
@@ -2,7 +2,7 @@ package chat.rocket.android.main.ui
import
DrawableHelper
import
android.app.Activity
import
android.app.AlertDialog
import
android
x.appcompat
.app.AlertDialog
import
android.app.ProgressDialog
import
android.os.Bundle
import
androidx.annotation.IdRes
...
...
app/src/main/java/chat/rocket/android/profile/ui/ProfileFragment.kt
View file @
507413e7
...
...
@@ -2,7 +2,7 @@ package chat.rocket.android.profile.ui
import
DrawableHelper
import
android.app.Activity
import
android.app.AlertDialog
import
android
x.appcompat
.app.AlertDialog
import
android.content.Intent
import
android.graphics.Bitmap
import
android.os.Build
...
...
@@ -296,14 +296,16 @@ class ProfileFragment : Fragment(), ProfileView, ActionMode.Callback {
val
passwordEditText
=
EditText
(
context
)
passwordEditText
.
hint
=
getString
(
R
.
string
.
msg_password
)
val
builder
=
AlertDialog
.
Builder
(
context
)
builder
.
setTitle
(
R
.
string
.
title_are_you_sure
)
.
setView
(
passwordEditText
)
.
setPositiveButton
(
R
.
string
.
action_delete_account
)
{
_
,
_
->
presenter
.
deleteAccount
(
passwordEditText
.
text
.
toString
())
}
.
setNegativeButton
(
android
.
R
.
string
.
no
)
{
dialog
,
_
->
dialog
.
cancel
()
}
.
create
()
.
show
()
context
?.
let
{
val
builder
=
AlertDialog
.
Builder
(
it
)
builder
.
setTitle
(
R
.
string
.
title_are_you_sure
)
.
setView
(
passwordEditText
)
.
setPositiveButton
(
R
.
string
.
action_delete_account
)
{
_
,
_
->
presenter
.
deleteAccount
(
passwordEditText
.
text
.
toString
())
}
.
setNegativeButton
(
android
.
R
.
string
.
no
)
{
dialog
,
_
->
dialog
.
cancel
()
}
.
create
()
.
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