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
49a3f43a
Unverified
Commit
49a3f43a
authored
Jul 13, 2018
by
Filipe de Lima Brito
Committed by
GitHub
Jul 13, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1481 from shubhsherl/f1463
[IMPROVEMENT] Connecting view at top of the chat list
parents
8c7899c3
9240c531
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
24 deletions
+26
-24
ChatRoomFragment.kt
.../java/chat/rocket/android/chatroom/ui/ChatRoomFragment.kt
+8
-8
ChatRoomsFragment.kt
...ava/chat/rocket/android/chatrooms/ui/ChatRoomsFragment.kt
+10
-10
fragment_chat_room.xml
app/src/main/res/layout/fragment_chat_room.xml
+5
-4
fragment_chat_rooms.xml
app/src/main/res/layout/fragment_chat_rooms.xml
+3
-2
No files found.
app/src/main/java/chat/rocket/android/chatroom/ui/ChatRoomFragment.kt
View file @
49a3f43a
...
...
@@ -706,22 +706,22 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
override
fun
showConnectionState
(
state
:
State
)
{
ui
{
connection_status_text
.
fadeIn
()
text_connection_status
.
fadeIn
()
handler
.
removeCallbacks
(
dismissStatus
)
when
(
state
)
{
is
State
.
Connected
->
{
connection_status_text
.
text
=
getString
(
R
.
string
.
status_connected
)
text_connection_status
.
text
=
getString
(
R
.
string
.
status_connected
)
handler
.
postDelayed
(
dismissStatus
,
2000
)
}
is
State
.
Disconnected
->
connection_status_text
.
text
=
is
State
.
Disconnected
->
text_connection_status
.
text
=
getString
(
R
.
string
.
status_disconnected
)
is
State
.
Connecting
->
connection_status_text
.
text
=
is
State
.
Connecting
->
text_connection_status
.
text
=
getString
(
R
.
string
.
status_connecting
)
is
State
.
Authenticating
->
connection_status_text
.
text
=
is
State
.
Authenticating
->
text_connection_status
.
text
=
getString
(
R
.
string
.
status_authenticating
)
is
State
.
Disconnecting
->
connection_status_text
.
text
=
is
State
.
Disconnecting
->
text_connection_status
.
text
=
getString
(
R
.
string
.
status_disconnecting
)
is
State
.
Waiting
->
connection_status_text
.
text
=
is
State
.
Waiting
->
text_connection_status
.
text
=
getString
(
R
.
string
.
status_waiting
,
state
.
seconds
)
}
}
...
...
@@ -737,7 +737,7 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
}
private
val
dismissStatus
=
{
connection_status_text
.
fadeOut
()
text_connection_status
.
fadeOut
()
}
private
fun
setupRecyclerView
()
{
...
...
app/src/main/java/chat/rocket/android/chatrooms/ui/ChatRoomsFragment.kt
View file @
49a3f43a
...
...
@@ -297,25 +297,25 @@ class ChatRoomsFragment : Fragment(), ChatRoomsView {
private
fun
showConnectionState
(
state
:
State
)
{
Timber
.
d
(
"Got new state: $state"
)
ui
{
connection_status_text
.
fadeIn
()
text_connection_status
.
fadeIn
()
handler
.
removeCallbacks
(
dismissStatus
)
when
(
state
)
{
is
State
.
Connected
->
{
connection_status_text
.
text
=
getString
(
R
.
string
.
status_connected
)
text_connection_status
.
text
=
getString
(
R
.
string
.
status_connected
)
handler
.
postDelayed
(
dismissStatus
,
2000
)
}
is
State
.
Disconnected
->
connection_status_text
.
text
=
getString
(
R
.
string
.
status_disconnected
)
is
State
.
Connecting
->
connection_status_text
.
text
=
getString
(
R
.
string
.
status_connecting
)
is
State
.
Authenticating
->
connection_status_text
.
text
=
getString
(
R
.
string
.
status_authenticating
)
is
State
.
Disconnecting
->
connection_status_text
.
text
=
getString
(
R
.
string
.
status_disconnecting
)
is
State
.
Waiting
->
connection_status_text
.
text
=
getString
(
R
.
string
.
status_waiting
,
state
.
seconds
)
is
State
.
Disconnected
->
text_connection_status
.
text
=
getString
(
R
.
string
.
status_disconnected
)
is
State
.
Connecting
->
text_connection_status
.
text
=
getString
(
R
.
string
.
status_connecting
)
is
State
.
Authenticating
->
text_connection_status
.
text
=
getString
(
R
.
string
.
status_authenticating
)
is
State
.
Disconnecting
->
text_connection_status
.
text
=
getString
(
R
.
string
.
status_disconnecting
)
is
State
.
Waiting
->
text_connection_status
.
text
=
getString
(
R
.
string
.
status_waiting
,
state
.
seconds
)
}
}
}
private
val
dismissStatus
=
{
if
(
connection_status_text
!=
null
)
{
connection_status_text
.
fadeOut
()
if
(
text_connection_status
!=
null
)
{
text_connection_status
.
fadeOut
()
}
}
...
...
@@ -331,4 +331,4 @@ class ChatRoomsFragment : Fragment(), ChatRoomsView {
}
return
true
}
}
\ No newline at end of file
}
app/src/main/res/layout/fragment_chat_room.xml
View file @
49a3f43a
...
...
@@ -12,9 +12,9 @@
android:layout_width=
"0dp"
android:layout_height=
"0dp"
app:layout_constraintBottom_toTopOf=
"@id/text_typing_status"
app:layout_constraintTop_toBottomOf=
"@+id/text_connection_status"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
>
app:layout_constraintStart_toStartOf=
"parent"
>
<include
android:id=
"@+id/layout_message_list"
...
...
@@ -117,7 +117,7 @@
app:layout_constraintBottom_toTopOf=
"@id/layout_message_composer"
/>
<TextView
android:id=
"@+id/
connection_status_text
"
android:id=
"@+id/
text_connection_status
"
android:layout_width=
"match_parent"
android:layout_height=
"32dp"
android:alpha=
"0"
...
...
@@ -127,6 +127,7 @@
android:textAppearance=
"@style/TextAppearance.AppCompat.Body2"
android:textColor=
"@color/colorWhite"
android:visibility=
"gone"
app:layout_constraintTop_toTopOf=
"parent"
tools:alpha=
"1"
tools:text=
"connected"
tools:visibility=
"visible"
/>
...
...
@@ -144,4 +145,4 @@
app:layout_constraintTop_toTopOf=
"parent"
tools:visibility=
"visible"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
</androidx.constraintlayout.widget.ConstraintLayout>
app/src/main/res/layout/fragment_chat_rooms.xml
View file @
49a3f43a
...
...
@@ -8,6 +8,7 @@
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/recycler_view"
android:layout_below=
"@+id/text_connection_status"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
...
...
@@ -31,7 +32,7 @@
tools:visibility=
"visible"
/>
<TextView
android:id=
"@+id/
connection_status_text
"
android:id=
"@+id/
text_connection_status
"
android:layout_width=
"match_parent"
android:layout_height=
"32dp"
android:alpha=
"0"
...
...
@@ -55,4 +56,4 @@
android:textSize=
"20sp"
android:visibility=
"gone"
tools:visibility=
"visible"
/>
</RelativeLayout>
\ No newline at end of file
</RelativeLayout>
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