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
ef0c17c5
Unverified
Commit
ef0c17c5
authored
Oct 19, 2018
by
Rafael Kellermann Streit
Committed by
GitHub
Oct 19, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into basicauth
parents
80eaf693
aceef97b
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
34 deletions
+22
-34
RegisterUsernameFragment.kt
...ntication/registerusername/ui/RegisterUsernameFragment.kt
+3
-3
ResetPasswordFragment.kt
.../authentication/resetpassword/ui/ResetPasswordFragment.kt
+3
-3
MessageInfoFragment.kt
.../rocket/android/chatinformation/ui/MessageInfoFragment.kt
+4
-4
PeopleSuggestionsAdapter.kt
...cket/android/chatroom/adapter/PeopleSuggestionsAdapter.kt
+4
-4
ChatRoomsAdapter.kt
...java/chat/rocket/android/chatrooms/ui/ChatRoomsAdapter.kt
+8
-7
Ui.kt
app/src/main/java/chat/rocket/android/util/extensions/Ui.kt
+0
-13
No files found.
app/src/main/java/chat/rocket/android/authentication/registerusername/ui/RegisterUsernameFragment.kt
View file @
ef0c17c5
...
...
@@ -8,6 +8,7 @@ import android.view.View
import
android.view.ViewGroup
import
androidx.core.content.ContextCompat
import
androidx.core.view.ViewCompat
import
androidx.core.view.isVisible
import
androidx.fragment.app.Fragment
import
chat.rocket.android.R
import
chat.rocket.android.analytics.AnalyticsManager
...
...
@@ -16,7 +17,6 @@ import chat.rocket.android.authentication.registerusername.presentation.Register
import
chat.rocket.android.authentication.registerusername.presentation.RegisterUsernameView
import
chat.rocket.android.util.extension.asObservable
import
chat.rocket.android.util.extensions.inflate
import
chat.rocket.android.util.extensions.setVisible
import
chat.rocket.android.util.extensions.showKeyboard
import
chat.rocket.android.util.extensions.showToast
import
chat.rocket.android.util.extensions.textContent
...
...
@@ -113,13 +113,13 @@ class RegisterUsernameFragment : Fragment(), RegisterUsernameView {
override
fun
showLoading
()
{
ui
{
disableUserInput
()
view_loading
.
setVisible
(
true
)
view_loading
.
isVisible
=
true
}
}
override
fun
hideLoading
()
{
ui
{
view_loading
.
setVisible
(
false
)
view_loading
.
isVisible
=
false
enableUserInput
()
}
}
...
...
app/src/main/java/chat/rocket/android/authentication/resetpassword/ui/ResetPasswordFragment.kt
View file @
ef0c17c5
...
...
@@ -6,6 +6,7 @@ import android.view.View
import
android.view.ViewGroup
import
androidx.core.content.ContextCompat
import
androidx.core.view.ViewCompat
import
androidx.core.view.isVisible
import
androidx.fragment.app.Fragment
import
chat.rocket.android.R
import
chat.rocket.android.analytics.AnalyticsManager
...
...
@@ -15,7 +16,6 @@ import chat.rocket.android.authentication.resetpassword.presentation.ResetPasswo
import
chat.rocket.android.util.extension.asObservable
import
chat.rocket.android.util.extensions.inflate
import
chat.rocket.android.util.extensions.isEmail
import
chat.rocket.android.util.extensions.setVisible
import
chat.rocket.android.util.extensions.showKeyboard
import
chat.rocket.android.util.extensions.showToast
import
chat.rocket.android.util.extensions.textContent
...
...
@@ -93,13 +93,13 @@ class ResetPasswordFragment : Fragment(), ResetPasswordView {
override
fun
showLoading
()
{
ui
{
disableUserInput
()
view_loading
.
setVisible
(
true
)
view_loading
.
isVisible
=
true
}
}
override
fun
hideLoading
()
{
ui
{
view_loading
.
setVisible
(
false
)
view_loading
.
isVisible
=
false
enableUserInput
()
}
}
...
...
app/src/main/java/chat/rocket/android/chatinformation/ui/MessageInfoFragment.kt
View file @
ef0c17c5
...
...
@@ -4,6 +4,7 @@ import android.os.Bundle
import
android.view.LayoutInflater
import
android.view.View
import
android.view.ViewGroup
import
androidx.core.view.isVisible
import
androidx.fragment.app.Fragment
import
androidx.recyclerview.widget.DefaultItemAnimator
import
androidx.recyclerview.widget.LinearLayoutManager
...
...
@@ -15,7 +16,6 @@ import chat.rocket.android.chatinformation.adapter.ReadReceiptAdapter
import
chat.rocket.android.chatinformation.presentation.MessageInfoPresenter
import
chat.rocket.android.chatinformation.presentation.MessageInfoView
import
chat.rocket.android.chatinformation.viewmodel.ReadReceiptViewModel
import
chat.rocket.android.util.extensions.setVisible
import
chat.rocket.android.util.extensions.showToast
import
chat.rocket.android.util.extensions.ui
import
dagger.android.support.AndroidSupportInjection
...
...
@@ -86,15 +86,15 @@ class MessageInfoFragment : Fragment(), MessageInfoView {
override
fun
showLoading
()
{
ui
{
view_loading
.
setVisible
(
true
)
view_loading
.
isVisible
=
true
view_loading
.
show
()
}
}
override
fun
hideLoading
()
{
ui
{
view_loading
.
isVisible
=
false
view_loading
.
hide
()
view_loading
.
setVisible
(
false
)
}
}
...
...
app/src/main/java/chat/rocket/android/chatroom/adapter/PeopleSuggestionsAdapter.kt
View file @
ef0c17c5
...
...
@@ -7,10 +7,10 @@ import android.view.View
import
android.view.ViewGroup
import
android.widget.ImageView
import
android.widget.TextView
import
androidx.core.view.isVisible
import
chat.rocket.android.R
import
chat.rocket.android.chatroom.adapter.PeopleSuggestionsAdapter.PeopleSuggestionViewHolder
import
chat.rocket.android.chatroom.uimodel.suggestion.PeopleSuggestionUiModel
import
chat.rocket.android.util.extensions.setVisible
import
chat.rocket.android.suggestions.model.SuggestionModel
import
chat.rocket.android.suggestions.ui.BaseSuggestionViewHolder
import
chat.rocket.android.suggestions.ui.SuggestionsAdapter
...
...
@@ -58,9 +58,9 @@ class PeopleSuggestionsAdapter(context: Context) : SuggestionsAdapter<PeopleSugg
username
.
text
=
item
.
username
name
.
text
=
item
.
name
if
(
item
.
imageUri
?.
isEmpty
()
!=
false
)
{
avatar
.
setVisible
(
false
)
avatar
.
isVisible
=
false
}
else
{
avatar
.
setVisible
(
true
)
avatar
.
isVisible
=
true
avatar
.
setImageURI
(
item
.
imageUri
)
}
val
status
=
item
.
status
...
...
@@ -68,7 +68,7 @@ class PeopleSuggestionsAdapter(context: Context) : SuggestionsAdapter<PeopleSugg
val
statusDrawable
=
DrawableHelper
.
getUserStatusDrawable
(
status
,
itemView
.
context
)
statusView
.
setImageDrawable
(
statusDrawable
)
}
else
{
statusView
.
setVisible
(
false
)
statusView
.
isVisible
=
false
}
setOnClickListener
{
itemClickListener
?.
onClick
(
item
)
...
...
app/src/main/java/chat/rocket/android/chatrooms/ui/ChatRoomsAdapter.kt
View file @
ef0c17c5
...
...
@@ -12,6 +12,7 @@ import android.view.View
import
android.view.ViewGroup
import
android.widget.ImageView
import
android.widget.TextView
import
androidx.core.view.isVisible
import
chat.rocket.android.R
import
chat.rocket.android.infrastructure.LocalRepository
import
chat.rocket.android.infrastructure.checkIfMyself
...
...
@@ -53,13 +54,13 @@ class ChatRoomsAdapter(
bindName
(
chatRoom
,
text_chat_name
)
bindIcon
(
chatRoom
,
image_chat_icon
)
if
(
settings
.
showLastMessage
())
{
text_last_message
.
setVisible
(
true
)
text_last_message_date_time
.
setVisible
(
true
)
text_last_message
.
isVisible
=
true
text_last_message_date_time
.
isVisible
=
true
bindLastMessageDateTime
(
chatRoom
,
text_last_message_date_time
)
bindLastMessage
(
chatRoom
,
text_last_message
)
}
else
{
text_last_message
.
setVisible
(
false
)
text_last_message_date_time
.
setVisible
(
false
)
text_last_message
.
isVisible
=
false
text_last_message_date_time
.
isVisible
=
false
}
bindUnreadMessages
(
chatRoom
,
text_total_unread_messages
)
...
...
@@ -178,13 +179,13 @@ class ChatRoomsAdapter(
when
{
totalUnreadMessage
in
1
..
99
->
{
textView
.
textContent
=
totalUnreadMessage
.
toString
()
textView
.
setVisible
(
true
)
textView
.
isVisible
=
true
}
totalUnreadMessage
>
99
->
{
textView
.
textContent
=
context
.
getString
(
R
.
string
.
msg_more_than_ninety_nine_unread_messages
)
textView
.
setVisible
(
true
)
textView
.
isVisible
=
true
}
else
->
textView
.
setVisible
(
false
)
else
->
textView
.
isVisible
=
false
}
}
}
...
...
app/src/main/java/chat/rocket/android/util/extensions/Ui.kt
View file @
ef0c17c5
...
...
@@ -37,19 +37,6 @@ fun FragmentActivity.clearLightStatusBar() {
}
}
// TODO: Remove. Use KTX instead.
fun
View
.
setVisible
(
visible
:
Boolean
)
{
visibility
=
if
(
visible
)
{
View
.
VISIBLE
}
else
{
View
.
GONE
}
}
fun
View
.
isVisible
():
Boolean
{
return
visibility
==
View
.
VISIBLE
}
fun
ViewGroup
.
inflate
(
@LayoutRes
resource
:
Int
,
attachToRoot
:
Boolean
=
false
):
View
=
LayoutInflater
.
from
(
context
).
inflate
(
resource
,
this
,
attachToRoot
)
...
...
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