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
ca906535
Unverified
Commit
ca906535
authored
Jun 11, 2018
by
Lucio Maciel
Committed by
GitHub
Jun 11, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into improvement/web-view-cache
parents
002a800e
8ea0a6a1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
35 deletions
+25
-35
ChatRoomFragment.kt
.../java/chat/rocket/android/chatroom/ui/ChatRoomFragment.kt
+2
-14
fragment_chat_room.xml
app/src/main/res/layout/fragment_chat_room.xml
+23
-21
No files found.
app/src/main/java/chat/rocket/android/chatroom/ui/ChatRoomFragment.kt
View file @
ca906535
...
...
@@ -265,7 +265,7 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
verticalScrollOffset
.
set
(
0
)
}
presenter
.
loadActiveMembers
(
chatRoomId
,
chatRoomType
,
filterSelfOut
=
true
)
toggleNoChatView
(
adapter
.
itemCount
)
empty_chat_view
.
isVisible
=
adapter
.
itemCount
==
0
}
}
...
...
@@ -287,18 +287,6 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
}
private
fun
toggleNoChatView
(
size
:
Int
)
{
if
(
size
==
0
)
{
image_chat_icon
.
setVisible
(
true
)
text_chat_title
.
setVisible
(
true
)
text_chat_description
.
setVisible
(
true
)
}
else
{
image_chat_icon
.
setVisible
(
false
)
text_chat_title
.
setVisible
(
false
)
text_chat_description
.
setVisible
(
false
)
}
}
private
val
layoutChangeListener
=
View
.
OnLayoutChangeListener
{
_
,
_
,
_
,
_
,
bottom
,
_
,
_
,
_
,
oldBottom
->
val
y
=
oldBottom
-
bottom
...
...
@@ -412,7 +400,7 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
adapter
.
prependData
(
message
)
recycler_view
.
scrollToPosition
(
0
)
verticalScrollOffset
.
set
(
0
)
toggleNoChatView
(
adapter
.
itemCount
)
empty_chat_view
.
isVisible
=
adapter
.
itemCount
==
0
}
}
...
...
app/src/main/res/layout/fragment_chat_room.xml
View file @
ca906535
...
...
@@ -7,19 +7,6 @@
android:layout_height=
"match_parent"
tools:context=
".chatroom.ui.ChatRoomFragment"
>
<com.wang.avi.AVLoadingIndicatorView
android:id=
"@+id/view_loading"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:visibility=
"gone"
app:indicatorColor=
"@color/colorBlack"
app:indicatorName=
"BallPulseIndicator"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
tools:visibility=
"visible"
/>
<FrameLayout
android:id=
"@+id/message_list_container"
android:layout_width=
"0dp"
...
...
@@ -43,13 +30,11 @@
android:layout_height=
"100dp"
android:src=
"@drawable/ic_chat_black_24dp"
android:tint=
"@color/icon_grey"
android:visibility=
"gone"
app:layout_constraintBottom_toTopOf=
"@id/text_chat_title"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintVertical_chainStyle=
"packed"
tools:visibility=
"visible"
/>
app:layout_constraintVertical_chainStyle=
"packed"
/>
<TextView
android:id=
"@+id/text_chat_title"
...
...
@@ -60,12 +45,10 @@
android:textColor=
"@color/colorSecondaryText"
android:textSize=
"20sp"
android:textStyle=
"bold"
android:visibility=
"gone"
app:layout_constraintBottom_toTopOf=
"@id/text_chat_description"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/image_chat_icon"
tools:visibility=
"visible"
/>
app:layout_constraintTop_toBottomOf=
"@id/image_chat_icon"
/>
<TextView
android:id=
"@+id/text_chat_description"
...
...
@@ -76,11 +59,17 @@
android:textAlignment=
"center"
android:textColor=
"@color/colorSecondaryTextLight"
android:textSize=
"16sp"
android:visibility=
"gone"
app:layout_constraintBottom_toTopOf=
"@id/layout_message_composer"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/text_chat_title"
app:layout_constraintTop_toBottomOf=
"@id/text_chat_title"
/>
<android.support.constraint.Group
android:id=
"@+id/empty_chat_view"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
app:constraint_referenced_ids=
"image_chat_icon, text_chat_title, text_chat_description"
android:visibility=
"gone"
tools:visibility=
"visible"
/>
<chat.rocket.android.widget.autocompletion.ui.SuggestionsView
...
...
@@ -142,4 +131,17 @@
tools:text=
"connected"
tools:visibility=
"visible"
/>
<com.wang.avi.AVLoadingIndicatorView
android:id=
"@+id/view_loading"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:visibility=
"gone"
app:indicatorColor=
"@color/colorBlack"
app:indicatorName=
"BallPulseIndicator"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
tools:visibility=
"visible"
/>
</android.support.constraint.ConstraintLayout>
\ No newline at end of file
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