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
90cf5125
Commit
90cf5125
authored
May 25, 2018
by
Filipe de Lima Brito
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Shows only the chat icon on the chat room view.
parent
2ed0f6d7
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
125 additions
and
209 deletions
+125
-209
build.gradle
app/build.gradle
+2
-2
ChatRoomActivity.kt
.../java/chat/rocket/android/chatroom/ui/ChatRoomActivity.kt
+36
-50
ChatRoomFragment.kt
.../java/chat/rocket/android/chatroom/ui/ChatRoomFragment.kt
+19
-42
ChatRoomsAdapter.kt
...java/chat/rocket/android/chatrooms/ui/ChatRoomsAdapter.kt
+2
-2
FavoriteMessagesFragment.kt
...t/android/favoritemessages/ui/FavoriteMessagesFragment.kt
+4
-1
FilesFragment.kt
...c/main/java/chat/rocket/android/files/ui/FilesFragment.kt
+4
-3
MembersFragment.kt
...in/java/chat/rocket/android/members/ui/MembersFragment.kt
+4
-3
PinnedMessagesFragment.kt
...ocket/android/pinnedmessages/ui/PinnedMessagesFragment.kt
+4
-1
ic_hashtag_12dp.xml
app/src/main/res/drawable/ic_hashtag_12dp.xml
+0
-30
ic_hashtag_black_12dp.xml
app/src/main/res/drawable/ic_hashtag_black_12dp.xml
+22
-0
ic_lock_12_dp.xml
app/src/main/res/drawable/ic_lock_12_dp.xml
+0
-18
ic_lock_black_12_dp.xml
app/src/main/res/drawable/ic_lock_black_12_dp.xml
+16
-0
ic_room_channel.xml
app/src/main/res/drawable/ic_room_channel.xml
+0
-9
ic_room_dm.xml
app/src/main/res/drawable/ic_room_dm.xml
+0
-9
ic_room_lock.xml
app/src/main/res/drawable/ic_room_lock.xml
+0
-9
app_bar_chat_room.xml
app/src/main/res/layout/app_bar_chat_room.xml
+9
-27
item_chat.xml
app/src/main/res/layout/item_chat.xml
+2
-2
dimens.xml
app/src/main/res/values/dimens.xml
+1
-1
No files found.
app/build.gradle
View file @
90cf5125
...
@@ -13,8 +13,8 @@ android {
...
@@ -13,8 +13,8 @@ android {
applicationId
"chat.rocket.android"
applicationId
"chat.rocket.android"
minSdkVersion
21
minSdkVersion
21
targetSdkVersion
versions
.
targetSdk
targetSdkVersion
versions
.
targetSdk
versionCode
202
1
versionCode
202
2
versionName
"2.
2
.0"
versionName
"2.
3
.0"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled
true
multiDexEnabled
true
}
}
...
...
app/src/main/java/chat/rocket/android/chatroom/ui/ChatRoomActivity.kt
View file @
90cf5125
package
chat.rocket.android.chatroom.ui
package
chat.rocket.android.chatroom.ui
import
DrawableHelper
import
android.content.Context
import
android.content.Context
import
android.content.Intent
import
android.content.Intent
import
android.os.Bundle
import
android.os.Bundle
import
android.support.v4.app.Fragment
import
android.support.v4.app.Fragment
import
android.support.v7.app.AppCompatActivity
import
android.support.v7.app.AppCompatActivity
import
android.text.SpannableStringBuilder
import
androidx.core.view.isVisible
import
chat.rocket.android.R
import
chat.rocket.android.R
import
chat.rocket.android.chatroom.presentation.ChatRoomNavigator
import
chat.rocket.android.chatroom.presentation.ChatRoomNavigator
import
chat.rocket.android.server.domain.GetCurrentServerInteractor
import
chat.rocket.android.server.domain.GetCurrentServerInteractor
...
@@ -63,14 +66,6 @@ class ChatRoomActivity : AppCompatActivity(), HasSupportFragmentInjector {
...
@@ -63,14 +66,6 @@ class ChatRoomActivity : AppCompatActivity(), HasSupportFragmentInjector {
@Inject
@Inject
lateinit
var
managerFactory
:
ConnectionManagerFactory
lateinit
var
managerFactory
:
ConnectionManagerFactory
private
lateinit
var
chatRoomId
:
String
private
lateinit
var
chatRoomName
:
String
private
lateinit
var
chatRoomType
:
String
private
var
isChatRoomReadOnly
:
Boolean
=
false
private
var
isChatRoomSubscribed
:
Boolean
=
true
private
var
isChatRoomCreator
:
Boolean
=
false
private
var
chatRoomLastSeen
:
Long
=
-
1L
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
AndroidInjection
.
inject
(
this
)
AndroidInjection
.
inject
(
this
)
super
.
onCreate
(
savedInstanceState
)
super
.
onCreate
(
savedInstanceState
)
...
@@ -85,33 +80,33 @@ class ChatRoomActivity : AppCompatActivity(), HasSupportFragmentInjector {
...
@@ -85,33 +80,33 @@ class ChatRoomActivity : AppCompatActivity(), HasSupportFragmentInjector {
return
return
}
}
chatRoomId
=
intent
.
getStringExtra
(
INTENT_CHAT_ROOM_ID
)
val
chatRoomId
=
intent
.
getStringExtra
(
INTENT_CHAT_ROOM_ID
)
requireNotNull
(
chatRoomId
)
{
"no chat_room_id provided in Intent extras"
}
requireNotNull
(
chatRoomId
)
{
"no chat_room_id provided in Intent extras"
}
chatRoomName
=
intent
.
getStringExtra
(
INTENT_CHAT_ROOM_NAME
)
val
chatRoomName
=
intent
.
getStringExtra
(
INTENT_CHAT_ROOM_NAME
)
requireNotNull
(
chatRoomName
)
{
"no chat_room_name provided in Intent extras"
}
requireNotNull
(
chatRoomName
)
{
"no chat_room_name provided in Intent extras"
}
chatRoomType
=
intent
.
getStringExtra
(
INTENT_CHAT_ROOM_TYPE
)
val
chatRoomType
=
intent
.
getStringExtra
(
INTENT_CHAT_ROOM_TYPE
)
requireNotNull
(
chatRoomType
)
{
"no chat_room_type provided in Intent extras"
}
requireNotNull
(
chatRoomType
)
{
"no chat_room_type provided in Intent extras"
}
isChatRoomReadOnly
=
intent
.
getBooleanExtra
(
INTENT_CHAT_ROOM_IS_READ_ONLY
,
true
)
val
isChatRoomReadOnly
=
intent
.
getBooleanExtra
(
INTENT_CHAT_ROOM_IS_READ_ONLY
,
true
)
requireNotNull
(
isChatRoomReadOnly
)
{
"no chat_room_is_read_only provided in Intent extras"
}
isChatRoomCreator
=
intent
.
getBooleanExtra
(
INTENT_CHAT_ROOM_IS_CREATOR
,
false
)
val
isChatRoomCreator
=
intent
.
getBooleanExtra
(
INTENT_CHAT_ROOM_IS_CREATOR
,
false
)
requireNotNull
(
isChatRoomCreator
)
{
"no chat_room_is_creator provided in Intent extras"
}
val
chatRoom
Message
=
intent
.
getStringExtra
(
INTENT_CHAT_ROOM_MESSAGE
)
val
chatRoom
LastSeen
=
intent
.
getLongExtra
(
INTENT_CHAT_ROOM_LAST_SEEN
,
-
1
)
setupToolbar
(
)
val
isChatRoomSubscribed
=
intent
.
getBooleanExtra
(
INTENT_CHAT_IS_SUBSCRIBED
,
true
)
chatRoomLastSeen
=
intent
.
getLongExtra
(
INTENT_CHAT_ROOM_LAST_SEEN
,
-
1
)
val
chatRoomMessage
=
intent
.
getStringExtra
(
INTENT_CHAT_ROOM_MESSAGE
)
isChatRoomSubscribed
=
intent
.
getBooleanExtra
(
INTENT_CHAT_IS_SUBSCRIBED
,
true
)
setupToolbar
(
)
if
(
supportFragmentManager
.
findFragmentByTag
(
TAG_CHAT_ROOM_FRAGMENT
)
==
null
)
{
if
(
supportFragmentManager
.
findFragmentByTag
(
TAG_CHAT_ROOM_FRAGMENT
)
==
null
)
{
addFragment
(
TAG_CHAT_ROOM_FRAGMENT
,
R
.
id
.
fragment_container
)
{
addFragment
(
TAG_CHAT_ROOM_FRAGMENT
,
R
.
id
.
fragment_container
)
{
newInstance
(
chatRoomId
,
chatRoomName
,
chatRoomType
,
isChatRoomReadOnly
,
chatRoomLastSeen
,
newInstance
(
isChatRoomSubscribed
,
isChatRoomCreator
,
chatRoomMessage
)
chatRoomId
,
chatRoomName
,
chatRoomType
,
isChatRoomReadOnly
,
chatRoomLastSeen
,
isChatRoomSubscribed
,
isChatRoomCreator
,
chatRoomMessage
)
}
}
}
}
}
}
...
@@ -128,43 +123,34 @@ class ChatRoomActivity : AppCompatActivity(), HasSupportFragmentInjector {
...
@@ -128,43 +123,34 @@ class ChatRoomActivity : AppCompatActivity(), HasSupportFragmentInjector {
setSupportActionBar
(
toolbar
)
setSupportActionBar
(
toolbar
)
supportActionBar
?.
setDisplayShowTitleEnabled
(
false
)
supportActionBar
?.
setDisplayShowTitleEnabled
(
false
)
toolbar
.
setNavigationIcon
(
R
.
drawable
.
ic_arrow_back_white_24dp
)
toolbar
.
setNavigationIcon
(
R
.
drawable
.
ic_arrow_back_white_24dp
)
text_room_name
.
textContent
=
chatRoomName
showRoomTypeIcon
(
true
)
toolbar
.
setNavigationOnClickListener
{
finishActivity
()
}
toolbar
.
setNavigationOnClickListener
{
finishActivity
()
}
}
}
fun
showRoomTypeIcon
(
showRoomTypeIcon
:
Boolean
)
{
fun
showToolbarTitle
(
title
:
String
)
{
if
(
showRoomTypeIcon
)
{
text_room_name
.
textContent
=
title
val
roomType
=
roomTypeOf
(
chatRoomType
)
}
val
drawable
=
when
(
roomType
)
{
is
RoomType
.
Channel
->
{
DrawableHelper
.
getDrawableFromId
(
R
.
drawable
.
ic_room_channel
,
this
)
}
is
RoomType
.
PrivateGroup
->
{
DrawableHelper
.
getDrawableFromId
(
R
.
drawable
.
ic_room_lock
,
this
)
}
is
RoomType
.
DirectMessage
->
{
DrawableHelper
.
getDrawableFromId
(
R
.
drawable
.
ic_room_dm
,
this
)
}
else
->
null
}
drawable
?.
let
{
fun
showToolbarChatRoomIcon
(
chatRoomType
:
String
)
{
val
wrappedDrawable
=
DrawableHelper
.
wrapDrawable
(
it
)
val
drawable
=
when
(
roomTypeOf
(
chatRoomType
))
{
val
mutableDrawable
=
wrappedDrawable
.
mutate
()
is
RoomType
.
Channel
->
{
DrawableHelper
.
tintDrawable
(
mutableDrawable
,
this
,
R
.
color
.
colorWhite
)
DrawableHelper
.
getDrawableFromId
(
R
.
drawable
.
ic_hashtag_black_12dp
,
this
)
DrawableHelper
.
compoundDrawable
(
text_room_name
,
mutableDrawable
)
}
}
}
else
{
is
RoomType
.
PrivateGroup
->
{
text_room_name
.
setCompoundDrawablesWithIntrinsicBounds
(
0
,
0
,
0
,
0
)
DrawableHelper
.
getDrawableFromId
(
R
.
drawable
.
ic_lock_black_12_dp
,
this
)
}
else
->
null
}
}
}
drawable
?.
let
{
val
wrappedDrawable
=
DrawableHelper
.
wrapDrawable
(
it
)
val
mutableDrawable
=
wrappedDrawable
.
mutate
()
DrawableHelper
.
tintDrawable
(
mutableDrawable
,
this
,
R
.
color
.
colorWhite
)
DrawableHelper
.
compoundDrawable
(
text_room_name
,
mutableDrawable
)
}
}
fun
setupToolbarTitle
(
toolbarTitle
:
String
)
{
fun
hideToolbarChatRoomIcon
(
)
{
text_room_name
.
textContent
=
toolbarTitle
text_room_name
.
setCompoundDrawablesWithIntrinsicBounds
(
0
,
0
,
0
,
0
)
}
}
private
fun
finishActivity
()
{
private
fun
finishActivity
()
{
...
...
app/src/main/java/chat/rocket/android/chatroom/ui/ChatRoomFragment.kt
View file @
90cf5125
...
@@ -13,22 +13,12 @@ import android.support.v4.app.Fragment
...
@@ -13,22 +13,12 @@ import android.support.v4.app.Fragment
import
android.support.v7.widget.DefaultItemAnimator
import
android.support.v7.widget.DefaultItemAnimator
import
android.support.v7.widget.LinearLayoutManager
import
android.support.v7.widget.LinearLayoutManager
import
android.support.v7.widget.RecyclerView
import
android.support.v7.widget.RecyclerView
import
android.view.KeyEvent
import
android.view.LayoutInflater
import
android.view.Menu
import
android.view.MenuInflater
import
android.view.MenuItem
import
android.view.View
import
android.view.ViewGroup
import
android.text.SpannableStringBuilder
import
android.text.SpannableStringBuilder
import
android.view.*
import
androidx.core.text.bold
import
androidx.core.text.bold
import
androidx.core.view.isVisible
import
androidx.core.view.isVisible
import
chat.rocket.android.R
import
chat.rocket.android.R
import
chat.rocket.android.chatroom.adapter.ChatRoomAdapter
import
chat.rocket.android.chatroom.adapter.*
import
chat.rocket.android.chatroom.adapter.CommandSuggestionsAdapter
import
chat.rocket.android.chatroom.adapter.PEOPLE
import
chat.rocket.android.chatroom.adapter.PeopleSuggestionsAdapter
import
chat.rocket.android.chatroom.adapter.RoomSuggestionsAdapter
import
chat.rocket.android.chatroom.presentation.ChatRoomPresenter
import
chat.rocket.android.chatroom.presentation.ChatRoomPresenter
import
chat.rocket.android.chatroom.presentation.ChatRoomView
import
chat.rocket.android.chatroom.presentation.ChatRoomView
import
chat.rocket.android.chatroom.viewmodel.BaseViewModel
import
chat.rocket.android.chatroom.viewmodel.BaseViewModel
...
@@ -39,26 +29,8 @@ import chat.rocket.android.chatroom.viewmodel.suggestion.PeopleSuggestionViewMod
...
@@ -39,26 +29,8 @@ import chat.rocket.android.chatroom.viewmodel.suggestion.PeopleSuggestionViewMod
import
chat.rocket.android.helper.EndlessRecyclerViewScrollListener
import
chat.rocket.android.helper.EndlessRecyclerViewScrollListener
import
chat.rocket.android.helper.KeyboardHelper
import
chat.rocket.android.helper.KeyboardHelper
import
chat.rocket.android.helper.MessageParser
import
chat.rocket.android.helper.MessageParser
import
chat.rocket.android.util.extensions.asObservable
import
chat.rocket.android.util.extensions.*
import
chat.rocket.android.util.extensions.circularRevealOrUnreveal
import
chat.rocket.android.widget.emoji.*
import
chat.rocket.android.util.extensions.fadeIn
import
chat.rocket.android.util.extensions.fadeOut
import
chat.rocket.android.util.extensions.hideKeyboard
import
chat.rocket.android.util.extensions.inflate
import
chat.rocket.android.util.extensions.isAtBottom
import
chat.rocket.android.util.extensions.rotateBy
import
chat.rocket.android.util.extensions.setVisible
import
chat.rocket.android.util.extensions.showToast
import
chat.rocket.android.util.extensions.textContent
import
chat.rocket.android.util.extensions.ui
import
chat.rocket.android.widget.emoji.ComposerEditText
import
chat.rocket.android.widget.emoji.Emoji
import
chat.rocket.android.widget.emoji.EmojiKeyboardListener
import
chat.rocket.android.widget.emoji.EmojiKeyboardPopup
import
chat.rocket.android.widget.emoji.EmojiListenerAdapter
import
chat.rocket.android.widget.emoji.EmojiParser
import
chat.rocket.android.widget.emoji.EmojiPickerPopup
import
chat.rocket.android.widget.emoji.EmojiReactionListener
import
chat.rocket.core.internal.realtime.socket.model.State
import
chat.rocket.core.internal.realtime.socket.model.State
import
chat.rocket.core.model.ChatRoom
import
chat.rocket.core.model.ChatRoom
import
dagger.android.support.AndroidSupportInjection
import
dagger.android.support.AndroidSupportInjection
...
@@ -187,8 +159,9 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
...
@@ -187,8 +159,9 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
setupFab
()
setupFab
()
setupSuggestionsView
()
setupSuggestionsView
()
setupActionSnackbar
()
setupActionSnackbar
()
activity
?.
apply
{
(
activity
as
ChatRoomActivity
).
let
{
(
this
as
?
ChatRoomActivity
)
?.
showRoomTypeIcon
(
true
)
it
.
showToolbarTitle
(
chatRoomName
)
it
.
showToolbarChatRoomIcon
(
chatRoomType
)
}
}
}
}
...
@@ -292,7 +265,11 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
...
@@ -292,7 +265,11 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
}
}
}
}
override
fun
onRoomUpdated
(
userCanPost
:
Boolean
,
channelIsBroadcast
:
Boolean
,
userCanMod
:
Boolean
)
{
override
fun
onRoomUpdated
(
userCanPost
:
Boolean
,
channelIsBroadcast
:
Boolean
,
userCanMod
:
Boolean
)
{
// TODO: We should rely solely on the user being able to post, but we cannot guarantee
// TODO: We should rely solely on the user being able to post, but we cannot guarantee
// that the "(channels|groups).roles" endpoint is supported by the server in use.
// that the "(channels|groups).roles" endpoint is supported by the server in use.
setupMessageComposer
(
userCanPost
)
setupMessageComposer
(
userCanPost
)
...
@@ -616,15 +593,15 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
...
@@ -616,15 +593,15 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
handler
.
postDelayed
(
dismissStatus
,
2000
)
handler
.
postDelayed
(
dismissStatus
,
2000
)
}
}
is
State
.
Disconnected
->
connection_status_text
.
text
=
is
State
.
Disconnected
->
connection_status_text
.
text
=
getString
(
R
.
string
.
status_disconnected
)
getString
(
R
.
string
.
status_disconnected
)
is
State
.
Connecting
->
connection_status_text
.
text
=
is
State
.
Connecting
->
connection_status_text
.
text
=
getString
(
R
.
string
.
status_connecting
)
getString
(
R
.
string
.
status_connecting
)
is
State
.
Authenticating
->
connection_status_text
.
text
=
is
State
.
Authenticating
->
connection_status_text
.
text
=
getString
(
R
.
string
.
status_authenticating
)
getString
(
R
.
string
.
status_authenticating
)
is
State
.
Disconnecting
->
connection_status_text
.
text
=
is
State
.
Disconnecting
->
connection_status_text
.
text
=
getString
(
R
.
string
.
status_disconnecting
)
getString
(
R
.
string
.
status_disconnecting
)
is
State
.
Waiting
->
connection_status_text
.
text
=
is
State
.
Waiting
->
connection_status_text
.
text
=
getString
(
R
.
string
.
status_waiting
,
state
.
seconds
)
getString
(
R
.
string
.
status_waiting
,
state
.
seconds
)
}
}
}
}
}
}
...
@@ -681,7 +658,7 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
...
@@ -681,7 +658,7 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
subscribeComposeTextMessage
()
subscribeComposeTextMessage
()
emojiKeyboardPopup
=
emojiKeyboardPopup
=
EmojiKeyboardPopup
(
activity
!!
,
activity
!!
.
findViewById
(
R
.
id
.
fragment_container
))
EmojiKeyboardPopup
(
activity
!!
,
activity
!!
.
findViewById
(
R
.
id
.
fragment_container
))
emojiKeyboardPopup
.
listener
=
this
emojiKeyboardPopup
.
listener
=
this
text_message
.
listener
=
object
:
ComposerEditText
.
ComposerEditTextListener
{
text_message
.
listener
=
object
:
ComposerEditText
.
ComposerEditTextListener
{
override
fun
onKeyboardOpened
()
{
override
fun
onKeyboardOpened
()
{
...
@@ -847,6 +824,6 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
...
@@ -847,6 +824,6 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
}
}
private
fun
setupToolbar
(
toolbarTitle
:
String
)
{
private
fun
setupToolbar
(
toolbarTitle
:
String
)
{
(
activity
as
ChatRoomActivity
).
s
etup
ToolbarTitle
(
toolbarTitle
)
(
activity
as
ChatRoomActivity
).
s
how
ToolbarTitle
(
toolbarTitle
)
}
}
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/chatrooms/ui/ChatRoomsAdapter.kt
View file @
90cf5125
...
@@ -92,11 +92,11 @@ class ChatRoomsAdapter(
...
@@ -92,11 +92,11 @@ class ChatRoomsAdapter(
private
fun
bindIcon
(
chatRoom
:
ChatRoom
,
imageView
:
ImageView
)
{
private
fun
bindIcon
(
chatRoom
:
ChatRoom
,
imageView
:
ImageView
)
{
val
drawable
=
when
(
chatRoom
.
type
)
{
val
drawable
=
when
(
chatRoom
.
type
)
{
is
RoomType
.
Channel
->
DrawableHelper
.
getDrawableFromId
(
is
RoomType
.
Channel
->
DrawableHelper
.
getDrawableFromId
(
R
.
drawable
.
ic_hashtag_12dp
,
R
.
drawable
.
ic_hashtag_
black_
12dp
,
context
context
)
)
is
RoomType
.
PrivateGroup
->
DrawableHelper
.
getDrawableFromId
(
is
RoomType
.
PrivateGroup
->
DrawableHelper
.
getDrawableFromId
(
R
.
drawable
.
ic_lock_12_dp
,
R
.
drawable
.
ic_lock_
black_
12_dp
,
context
context
)
)
is
RoomType
.
DirectMessage
->
DrawableHelper
.
getUserStatusDrawable
(
is
RoomType
.
DirectMessage
->
DrawableHelper
.
getUserStatusDrawable
(
...
...
app/src/main/java/chat/rocket/android/favoritemessages/ui/FavoriteMessagesFragment.kt
View file @
90cf5125
...
@@ -110,6 +110,9 @@ class FavoriteMessagesFragment : Fragment(), FavoriteMessagesView {
...
@@ -110,6 +110,9 @@ class FavoriteMessagesFragment : Fragment(), FavoriteMessagesView {
}
}
private
fun
setupToolbar
()
{
private
fun
setupToolbar
()
{
(
activity
as
ChatRoomActivity
).
setupToolbarTitle
(
getString
(
R
.
string
.
title_favorite_messages
))
(
activity
as
ChatRoomActivity
).
let
{
it
.
showToolbarTitle
(
getString
(
R
.
string
.
title_favorite_messages
))
it
.
hideToolbarChatRoomIcon
()
}
}
}
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/files/ui/FilesFragment.kt
View file @
90cf5125
...
@@ -147,8 +147,9 @@ class FilesFragment : Fragment(), FilesView {
...
@@ -147,8 +147,9 @@ class FilesFragment : Fragment(), FilesView {
}
}
private
fun
setupToolbar
(
totalFiles
:
Long
)
{
private
fun
setupToolbar
(
totalFiles
:
Long
)
{
(
activity
as
ChatRoomActivity
?)
?.
setupToolbarTitle
(
(
activity
as
ChatRoomActivity
).
let
{
getString
(
R
.
string
.
title_files_total
,
totalFiles
)
it
.
showToolbarTitle
(
getString
(
R
.
string
.
title_files_total
,
totalFiles
))
)
it
.
hideToolbarChatRoomIcon
()
}
}
}
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/members/ui/MembersFragment.kt
View file @
90cf5125
...
@@ -120,8 +120,9 @@ class MembersFragment : Fragment(), MembersView {
...
@@ -120,8 +120,9 @@ class MembersFragment : Fragment(), MembersView {
}
}
private
fun
setupToolbar
(
totalMembers
:
Long
)
{
private
fun
setupToolbar
(
totalMembers
:
Long
)
{
(
activity
as
ChatRoomActivity
?)
?.
setupToolbarTitle
(
(
activity
as
ChatRoomActivity
).
let
{
getString
(
R
.
string
.
title_members
,
totalMembers
)
it
.
showToolbarTitle
(
getString
(
R
.
string
.
title_members
,
totalMembers
))
)
it
.
hideToolbarChatRoomIcon
()
}
}
}
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/pinnedmessages/ui/PinnedMessagesFragment.kt
View file @
90cf5125
...
@@ -116,6 +116,9 @@ class PinnedMessagesFragment : Fragment(), PinnedMessagesView {
...
@@ -116,6 +116,9 @@ class PinnedMessagesFragment : Fragment(), PinnedMessagesView {
}
}
private
fun
setupToolbar
()
{
private
fun
setupToolbar
()
{
(
activity
as
ChatRoomActivity
).
setupToolbarTitle
(
getString
(
R
.
string
.
title_pinned_messages
))
(
activity
as
ChatRoomActivity
).
let
{
it
.
showToolbarTitle
(
getString
(
R
.
string
.
title_pinned_messages
))
it
.
hideToolbarChatRoomIcon
()
}
}
}
}
}
\ No newline at end of file
app/src/main/res/drawable/ic_hashtag_12dp.xml
deleted
100644 → 0
View file @
2ed0f6d7
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"12dp"
android:height=
"12dp"
android:viewportHeight=
"12"
android:viewportWidth=
"12"
>
<path
android:fillColor=
"#9EA2A8"
android:fillType=
"evenOdd"
android:pathData=
"M2.4,0h1.2v12h-1.2z"
android:strokeColor=
"#00000000"
android:strokeWidth=
"1"
/>
<path
android:fillColor=
"#9EA2A8"
android:fillType=
"evenOdd"
android:pathData=
"M0,2.4h12v1.2h-12z"
android:strokeColor=
"#00000000"
android:strokeWidth=
"1"
/>
<path
android:fillColor=
"#9EA2A8"
android:fillType=
"evenOdd"
android:pathData=
"M0,8.4h12v1.2h-12z"
android:strokeColor=
"#00000000"
android:strokeWidth=
"1"
/>
<path
android:fillColor=
"#9EA2A8"
android:fillType=
"evenOdd"
android:pathData=
"M8.4,0h1.2v12h-1.2z"
android:strokeColor=
"#00000000"
android:strokeWidth=
"1"
/>
</vector>
\ No newline at end of file
app/src/main/res/drawable/ic_hashtag_black_12dp.xml
0 → 100644
View file @
90cf5125
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"12dp"
android:height=
"12dp"
android:viewportHeight=
"12"
android:viewportWidth=
"12"
>
<path
android:fillColor=
"#FF000000"
android:pathData=
"M2.4,0h1.2v12h-1.2z"
/>
<path
android:fillColor=
"#FF000000"
android:pathData=
"M0,2.4h12v1.2h-12z"
/>
<path
android:fillColor=
"#FF000000"
android:pathData=
"M0,8.4h12v1.2h-12z"
/>
<path
android:fillColor=
"#FF000000"
android:pathData=
"M8.4,0h1.2v12h-1.2z"
/>
</vector>
\ No newline at end of file
app/src/main/res/drawable/ic_lock_12_dp.xml
deleted
100644 → 0
View file @
2ed0f6d7
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"12dp"
android:height=
"12dp"
android:viewportWidth=
"12"
android:viewportHeight=
"12"
>
<path
android:pathData=
"M1.5,5.5h9v6h-9z"
android:strokeWidth=
"1"
android:fillColor=
"#00000000"
android:strokeColor=
"#9EA2A8"
android:fillType=
"evenOdd"
/>
<path
android:pathData=
"M2.5,5.5L9.5,5.5L9.5,4C9.5,2.067 7.933,0.5 6,0.5C4.067,0.5 2.5,2.067 2.5,4L2.5,5.5Z"
android:strokeWidth=
"1"
android:fillColor=
"#00000000"
android:strokeColor=
"#9EA2A8"
android:fillType=
"evenOdd"
/>
</vector>
app/src/main/res/drawable/ic_lock_black_12_dp.xml
0 → 100644
View file @
90cf5125
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"12dp"
android:height=
"12dp"
android:viewportHeight=
"12"
android:viewportWidth=
"12"
>
<path
android:pathData=
"M1.5,5.5h9v6h-9z"
android:strokeColor=
"#FF000000"
android:strokeWidth=
"1"
/>
<path
android:pathData=
"M2.5,5.5L9.5,5.5L9.5,4C9.5,2.067 7.933,0.5 6,0.5C4.067,0.5 2.5,2.067 2.5,4L2.5,5.5Z"
android:strokeColor=
"#FF000000"
android:strokeWidth=
"1"
/>
</vector>
\ No newline at end of file
app/src/main/res/drawable/ic_room_channel.xml
deleted
100644 → 0
View file @
2ed0f6d7
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"16dp"
android:height=
"16dp"
android:viewportHeight=
"24.0"
android:viewportWidth=
"24.0"
>
<path
android:fillColor=
"#FF000000"
android:pathData=
"M22.548,9l0.452,-2h-5.364l1.364,-6h-2l-1.364,6h-5l1.364,-6h-2l-1.364,6h-6.184l-0.452,2h6.182l-1.364,6h-5.36l-0.458,2h5.364l-1.364,6h2l1.364,-6h5l-1.364,6h2l1.364,-6h6.185l0.451,-2h-6.182l1.364,-6h5.366zM13.818,15h-5l1.364,-6h5l-1.364,6z"
/>
</vector>
\ No newline at end of file
app/src/main/res/drawable/ic_room_dm.xml
deleted
100644 → 0
View file @
2ed0f6d7
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"16dp"
android:height=
"16dp"
android:viewportHeight=
"20.0"
android:viewportWidth=
"20.0"
>
<path
android:fillColor=
"#FF000000"
android:pathData=
"M13.6,13.47c-0.91,0.953 -2.191,1.545 -3.61,1.545 -2.756,0 -4.99,-2.234 -4.99,-4.99 0,-0.009 0,-0.018 0,-0.026v0.001c0,-2.761 2.239,-5 5,-5 1.131,0 2.175,0.376 3.013,1.009l-0.013,-0.009v-1h2v6.5c0,0.828 0.672,1.5 1.5,1.5s1.5,-0.672 1.5,-1.5v0,-1.5c-0.003,-4.416 -3.584,-7.994 -8,-7.994 -4.418,0 -8,3.582 -8,8s3.582,8 8,8c1.305,0 2.537,-0.312 3.625,-0.867l-0.045,0.021 0.9,1.79c-1.305,0.668 -2.847,1.06 -4.48,1.06 -5.523,0 -10,-4.477 -10,-10s4.477,-10 10,-10c5.519,0 9.994,4.472 10,9.99v0.001h-0.01v1.5c0,0.003 0,0.007 0,0.01 0,1.933 -1.567,3.5 -3.5,3.5 -1.202,0 -2.262,-0.606 -2.892,-1.528l-0.008,-0.012zM10,13c1.657,0 3,-1.343 3,-3s-1.343,-3 -3,-3v0c-1.657,0 -3,1.343 -3,3s1.343,3 3,3v0z"
/>
</vector>
\ No newline at end of file
app/src/main/res/drawable/ic_room_lock.xml
deleted
100644 → 0
View file @
2ed0f6d7
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"16dp"
android:height=
"16dp"
android:viewportHeight=
"24.0"
android:viewportWidth=
"24.0"
>
<path
android:fillColor=
"#FF000000"
android:pathData=
"M18,10v-4c0,-3.313 -2.687,-6 -6,-6s-6,2.687 -6,6v4h-3v14h18v-14h-3zM8,6c0,-2.206 1.794,-4 4,-4s4,1.794 4,4v4h-8v-4zM19,22h-14v-10h14v10z"
/>
</vector>
\ No newline at end of file
app/src/main/res/layout/app_bar_chat_room.xml
View file @
90cf5125
...
@@ -16,35 +16,17 @@
...
@@ -16,35 +16,17 @@
app:popupTheme=
"@style/ThemeOverlay.AppCompat.Light"
app:popupTheme=
"@style/ThemeOverlay.AppCompat.Light"
app:theme=
"@style/ThemeOverlay.AppCompat.Dark.ActionBar"
>
app:theme=
"@style/ThemeOverlay.AppCompat.Dark.ActionBar"
>
<
android.support.constraint.ConstraintLayout
<
TextView
android:id=
"@+id/t
oolbar_content_container
"
android:id=
"@+id/t
ext_room_name
"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
>
android:drawablePadding=
"@dimen/text_view_drawable_padding"
android:ellipsize=
"end"
<!-- TODO implement -->
android:maxLines=
"1"
<com.facebook.drawee.view.SimpleDraweeView
android:textColor=
"@color/colorWhite"
android:id=
"@+id/image_room_avatar"
android:textSize=
"18sp"
android:layout_width=
"30dp"
android:textStyle=
"bold"
android:layout_height=
"30dp"
tools:text=
"general"
/>
android:visibility=
"gone"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:roundAsCircle=
"true"
/>
<TextView
android:id=
"@+id/text_room_name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"10dp"
android:drawablePadding=
"@dimen/text_view_drawable_padding"
android:ellipsize=
"end"
android:maxLines=
"1"
android:textColor=
"@color/colorWhite"
android:textSize=
"18sp"
android:textStyle=
"bold"
tools:text=
"Developers"
/>
</android.support.constraint.ConstraintLayout>
</android.support.v7.widget.Toolbar>
</android.support.v7.widget.Toolbar>
</android.support.design.widget.AppBarLayout>
</android.support.design.widget.AppBarLayout>
\ No newline at end of file
app/src/main/res/layout/item_chat.xml
View file @
90cf5125
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
app:layout_constraintBottom_toBottomOf=
"@+id/text_chat_name"
app:layout_constraintBottom_toBottomOf=
"@+id/text_chat_name"
app:layout_constraintStart_toEndOf=
"@+id/image_avatar"
app:layout_constraintStart_toEndOf=
"@+id/image_avatar"
app:layout_constraintTop_toTopOf=
"@+id/text_chat_name"
app:layout_constraintTop_toTopOf=
"@+id/text_chat_name"
tools:src=
"@drawable/ic_hashtag_12dp"
/>
tools:src=
"@drawable/ic_hashtag_
black_
12dp"
/>
<TextView
<TextView
...
@@ -53,7 +53,7 @@
...
@@ -53,7 +53,7 @@
style=
"@style/ChatRoom.Name.TextView"
style=
"@style/ChatRoom.Name.TextView"
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"
8dp
"
android:layout_marginStart=
"
@dimen/text_view_drawable_padding
"
android:ellipsize=
"end"
android:ellipsize=
"end"
android:lines=
"1"
android:lines=
"1"
android:maxLines=
"1"
android:maxLines=
"1"
...
...
app/src/main/res/values/dimens.xml
View file @
90cf5125
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<dimen
name=
"edit_text_margin"
>
10dp
</dimen>
<dimen
name=
"edit_text_margin"
>
10dp
</dimen>
<dimen
name=
"edit_text_drawable_padding"
>
16dp
</dimen>
<dimen
name=
"edit_text_drawable_padding"
>
16dp
</dimen>
<dimen
name=
"text_view_drawable_padding"
>
4
dp
</dimen>
<dimen
name=
"text_view_drawable_padding"
>
8
dp
</dimen>
<dimen
name=
"fab_elevation"
>
6dp
</dimen>
<dimen
name=
"fab_elevation"
>
6dp
</dimen>
...
...
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