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
9595ad8d
Commit
9595ad8d
authored
Jun 30, 2018
by
divyanshu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resolve conflicts
parent
e70f3bef
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
13 deletions
+15
-13
ChatRoomFragment.kt
.../java/chat/rocket/android/chatroom/ui/ChatRoomFragment.kt
+6
-3
ChatRoomsFragment.kt
...ava/chat/rocket/android/chatrooms/ui/ChatRoomsFragment.kt
+9
-10
No files found.
app/src/main/java/chat/rocket/android/chatroom/ui/ChatRoomFragment.kt
View file @
9595ad8d
...
...
@@ -13,11 +13,14 @@ import android.text.SpannableStringBuilder
import
android.view.KeyEvent
import
android.view.LayoutInflater
import
android.view.Menu
import
android.view.MenuInflater
import
android.view.MenuItem
import
android.view.View
import
android.view.ViewGroup
import
android.widget.*
import
android.widget.EditText
import
android.widget.Button
import
android.widget.FrameLayout
import
android.widget.ImageView
import
android.widget.TextView
import
androidx.annotation.DrawableRes
import
androidx.core.text.bold
import
androidx.core.view.isVisible
...
...
@@ -955,4 +958,4 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
private
fun
setupToolbar
(
toolbarTitle
:
String
)
{
(
activity
as
ChatRoomActivity
).
showToolbarTitle
(
toolbarTitle
)
}
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/chatrooms/ui/ChatRoomsFragment.kt
View file @
9595ad8d
...
...
@@ -148,7 +148,8 @@ class ChatRoomsFragment : Fragment(), ChatRoomsView {
inflater
.
inflate
(
R
.
menu
.
chatrooms
,
menu
)
val
searchItem
=
menu
.
findItem
(
R
.
id
.
action_search
)
searchView
=
searchItem
?.
actionView
as
SearchView
searchView
=
searchItem
?.
actionView
as
?
SearchView
searchView
?.
setIconifiedByDefault
(
false
)
searchView
?.
maxWidth
=
Integer
.
MAX_VALUE
searchView
?.
setOnQueryTextListener
(
object
:
SearchView
.
OnQueryTextListener
{
override
fun
onQueryTextSubmit
(
query
:
String
?):
Boolean
{
...
...
@@ -176,7 +177,7 @@ class ChatRoomsFragment : Fragment(), ChatRoomsView {
0
->
R
.
id
.
radio_sort_alphabetical
else
->
R
.
id
.
radio_sort_activity
})
radioGroup
.
setOnCheckedChangeListener
(
{
_
,
checkedId
->
radioGroup
.
setOnCheckedChangeListener
{
_
,
checkedId
->
run
{
SharedPreferenceHelper
.
putInt
(
Constants
.
CHATROOM_SORT_TYPE_KEY
,
when
(
checkedId
)
{
R
.
id
.
radio_sort_alphabetical
->
0
...
...
@@ -184,23 +185,21 @@ class ChatRoomsFragment : Fragment(), ChatRoomsView {
else
->
1
})
}
}
)
}
groupByTypeCheckBox
.
isChecked
=
groupByType
groupByTypeCheckBox
.
setOnCheckedChangeListener
(
{
_
,
isChecked
->
groupByTypeCheckBox
.
setOnCheckedChangeListener
{
_
,
isChecked
->
SharedPreferenceHelper
.
putBoolean
(
Constants
.
CHATROOM_GROUP_BY_TYPE_KEY
,
isChecked
)
}
)
}
val
dialogSort
=
AlertDialog
.
Builder
(
context
)
AlertDialog
.
Builder
(
context
)
.
setTitle
(
R
.
string
.
dialog_sort_title
)
.
setView
(
dialogLayout
)
.
setPositiveButton
(
"Done"
,
{
dialog
,
_
->
.
setPositiveButton
(
"Done"
)
{
dialog
,
_
->
invalidateQueryOnSearch
()
updateSort
()
dialog
.
dismiss
()
})
dialogSort
.
show
()
}.
show
()
}
}
return
super
.
onOptionsItemSelected
(
item
)
...
...
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