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
4d6cd6a0
Commit
4d6cd6a0
authored
Mar 14, 2018
by
Shailesh Baldaniya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: Headers on search and search results on query
parent
779f19d6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
6 deletions
+14
-6
ChatRoomsPresenter.kt
...cket/android/chatrooms/presentation/ChatRoomsPresenter.kt
+1
-1
ChatRoomsFragment.kt
...ava/chat/rocket/android/chatrooms/ui/ChatRoomsFragment.kt
+12
-4
styles.xml
app/src/main/res/values/styles.xml
+1
-1
No files found.
app/src/main/java/chat/rocket/android/chatrooms/presentation/ChatRoomsPresenter.kt
View file @
4d6cd6a0
...
@@ -170,7 +170,7 @@ class ChatRoomsPresenter @Inject constructor(private val view: ChatRoomsView,
...
@@ -170,7 +170,7 @@ class ChatRoomsPresenter @Inject constructor(private val view: ChatRoomsView,
return
getChatRoomsWithPreviews
(
sortedRooms
)
return
getChatRoomsWithPreviews
(
sortedRooms
)
}
}
fun
update
d
SortedChatRooms
()
{
fun
updateSortedChatRooms
()
{
val
currentServer
=
serverInteractor
.
get
()
!!
val
currentServer
=
serverInteractor
.
get
()
!!
launchUI
(
strategy
)
{
launchUI
(
strategy
)
{
val
roomList
=
getChatRoomsInteractor
.
get
(
currentServer
)
val
roomList
=
getChatRoomsInteractor
.
get
(
currentServer
)
...
...
app/src/main/java/chat/rocket/android/chatrooms/ui/ChatRoomsFragment.kt
View file @
4d6cd6a0
...
@@ -122,16 +122,16 @@ class ChatRoomsFragment : Fragment(), ChatRoomsView {
...
@@ -122,16 +122,16 @@ class ChatRoomsFragment : Fragment(), ChatRoomsView {
R
.
id
.
radio_sort_activity
->
1
R
.
id
.
radio_sort_activity
->
1
else
->
1
else
->
1
})
})
presenter
.
update
d
SortedChatRooms
()
presenter
.
updateSortedChatRooms
()
recycler_view
.
scrollTo
(
0
,
0
)
invalidateQueryOnSearch
(
)
}
}
})
})
groupByTypeCheckBox
.
isChecked
=
groupByType
groupByTypeCheckBox
.
isChecked
=
groupByType
groupByTypeCheckBox
.
setOnCheckedChangeListener
({
_
,
isChecked
->
groupByTypeCheckBox
.
setOnCheckedChangeListener
({
_
,
isChecked
->
SharedPreferenceHelper
.
putBoolean
(
Constants
.
CHATROOM_GROUP_BY_TYPE_KEY
,
isChecked
)
SharedPreferenceHelper
.
putBoolean
(
Constants
.
CHATROOM_GROUP_BY_TYPE_KEY
,
isChecked
)
presenter
.
update
d
SortedChatRooms
()
presenter
.
updateSortedChatRooms
()
recycler_view
.
scrollTo
(
0
,
0
)
invalidateQueryOnSearch
(
)
})
})
val
dialogSort
=
AlertDialog
.
Builder
(
context
)
val
dialogSort
=
AlertDialog
.
Builder
(
context
)
...
@@ -145,6 +145,14 @@ class ChatRoomsFragment : Fragment(), ChatRoomsView {
...
@@ -145,6 +145,14 @@ class ChatRoomsFragment : Fragment(), ChatRoomsView {
return
super
.
onOptionsItemSelected
(
item
)
return
super
.
onOptionsItemSelected
(
item
)
}
}
private
fun
invalidateQueryOnSearch
(){
searchView
?.
let
{
if
(!
searchView
!!
.
isIconified
){
queryChatRoomsByName
(
searchView
!!
.
query
.
toString
())
}
}
}
override
suspend
fun
updateChatRooms
(
newDataSet
:
List
<
ChatRoom
>)
{
override
suspend
fun
updateChatRooms
(
newDataSet
:
List
<
ChatRoom
>)
{
activity
?.
apply
{
activity
?.
apply
{
listJob
?.
cancel
()
listJob
?.
cancel
()
...
...
app/src/main/res/values/styles.xml
View file @
4d6cd6a0
...
@@ -72,7 +72,7 @@
...
@@ -72,7 +72,7 @@
</style>
</style>
<style
name=
"ChatRooms.Header"
parent=
"TextAppearance.AppCompat.Headline"
>
<style
name=
"ChatRooms.Header"
parent=
"TextAppearance.AppCompat.Headline"
>
<item
name=
"android:textSize"
>
1
8
sp
</item>
<item
name=
"android:textSize"
>
1
6
sp
</item>
</style>
</style>
<style
name=
"ChatRoom.Name.TextView"
parent=
"TextAppearance.AppCompat.Title"
>
<style
name=
"ChatRoom.Name.TextView"
parent=
"TextAppearance.AppCompat.Title"
>
...
...
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