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
a617e55d
Commit
a617e55d
authored
Mar 12, 2019
by
Divyanshu Bhargava
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Save the scroll Position of chatRoomsFragment
parent
8fb51af4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
ChatRoomsFragment.kt
...ava/chat/rocket/android/chatrooms/ui/ChatRoomsFragment.kt
+3
-2
No files found.
app/src/main/java/chat/rocket/android/chatrooms/ui/ChatRoomsFragment.kt
View file @
a617e55d
...
@@ -36,7 +36,6 @@ import chat.rocket.android.helper.SharedPreferenceHelper
...
@@ -36,7 +36,6 @@ import chat.rocket.android.helper.SharedPreferenceHelper
import
chat.rocket.android.util.extension.onQueryTextListener
import
chat.rocket.android.util.extension.onQueryTextListener
import
chat.rocket.android.util.extensions.fadeIn
import
chat.rocket.android.util.extensions.fadeIn
import
chat.rocket.android.util.extensions.fadeOut
import
chat.rocket.android.util.extensions.fadeOut
import
chat.rocket.android.util.extensions.ifNotNullNorEmpty
import
chat.rocket.android.util.extensions.ifNotNullNotEmpty
import
chat.rocket.android.util.extensions.ifNotNullNotEmpty
import
chat.rocket.android.util.extensions.inflate
import
chat.rocket.android.util.extensions.inflate
import
chat.rocket.android.util.extensions.showToast
import
chat.rocket.android.util.extensions.showToast
...
@@ -129,12 +128,14 @@ class ChatRoomsFragment : Fragment(), ChatRoomsView {
...
@@ -129,12 +128,14 @@ class ChatRoomsFragment : Fragment(), ChatRoomsView {
)
)
)
)
recycler_view
.
itemAnimator
=
DefaultItemAnimator
()
recycler_view
.
itemAnimator
=
DefaultItemAnimator
()
recycler_view
.
adapter
=
adapter
viewModel
.
getChatRooms
().
observe
(
viewLifecycleOwner
,
Observer
{
rooms
->
viewModel
.
getChatRooms
().
observe
(
viewLifecycleOwner
,
Observer
{
rooms
->
rooms
?.
let
{
rooms
?.
let
{
Timber
.
d
(
"Got items: $it"
)
Timber
.
d
(
"Got items: $it"
)
adapter
.
values
=
it
adapter
.
values
=
it
if
(
recycler_view
.
adapter
!=
adapter
)
{
recycler_view
.
adapter
=
adapter
}
if
(
rooms
.
isNotEmpty
())
{
if
(
rooms
.
isNotEmpty
())
{
text_no_data_to_display
.
isVisible
=
false
text_no_data_to_display
.
isVisible
=
false
}
}
...
...
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