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
fcb3b431
Commit
fcb3b431
authored
May 10, 2018
by
Filipe de Lima Brito
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add starr/unstar message feature.
parent
fe7af2e5
Changes
27
Show whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
271 additions
and
132 deletions
+271
-132
BaseViewHolder.kt
...va/chat/rocket/android/chatroom/adapter/BaseViewHolder.kt
+18
-12
ChatRoomAdapter.kt
...a/chat/rocket/android/chatroom/adapter/ChatRoomAdapter.kt
+26
-12
MessageViewHolder.kt
...chat/rocket/android/chatroom/adapter/MessageViewHolder.kt
+4
-4
ChatRoomPresenter.kt
...rocket/android/chatroom/presentation/ChatRoomPresenter.kt
+29
-0
ActionListAdapter.kt
...roid/chatroom/ui/bottomsheet/adapter/ActionListAdapter.kt
+9
-3
PinnedMessagesPresenter.kt
...id/pinnedmessages/presentation/PinnedMessagesPresenter.kt
+2
-2
PushManager.kt
app/src/main/java/chat/rocket/android/push/PushManager.kt
+1
-1
PermissionsInteractor.kt
...hat/rocket/android/server/domain/PermissionsInteractor.kt
+8
-3
RefreshSettingsInteractor.kt
...rocket/android/server/domain/RefreshSettingsInteractor.kt
+1
-1
SettingsRepository.kt
...a/chat/rocket/android/server/domain/SettingsRepository.kt
+2
-0
ic_action_message_copy_24dp.xml
app/src/main/res/drawable/ic_action_message_copy_24dp.xml
+10
-0
ic_action_message_delete_24dp.xml
app/src/main/res/drawable/ic_action_message_delete_24dp.xml
+10
-0
ic_action_message_edit_24dp.xml
app/src/main/res/drawable/ic_action_message_edit_24dp.xml
+8
-7
ic_action_message_pin_24dp.xml
app/src/main/res/drawable/ic_action_message_pin_24dp.xml
+10
-0
ic_action_message_quote_24dp.xml
app/src/main/res/drawable/ic_action_message_quote_24dp.xml
+10
-0
ic_action_message_reply_24dp.xml
app/src/main/res/drawable/ic_action_message_reply_24dp.xml
+10
-0
ic_action_message_star_24dp.xml
app/src/main/res/drawable/ic_action_message_star_24dp.xml
+10
-0
ic_pin_black_24dp.xml
app/src/main/res/drawable/ic_pin_black_24dp.xml
+0
-15
fragment_pinned_messages.xml
app/src/main/res/layout/fragment_pinned_messages.xml
+1
-1
item_message.xml
app/src/main/res/layout/item_message.xml
+38
-23
message_actions.xml
app/src/main/res/menu/message_actions.xml
+44
-48
strings.xml
app/src/main/res/values-es/strings.xml
+4
-0
strings.xml
app/src/main/res/values-fr/strings.xml
+5
-0
strings.xml
app/src/main/res/values-hi-rIN/strings.xml
+4
-0
strings.xml
app/src/main/res/values-pt-rBR/strings.xml
+2
-0
strings.xml
app/src/main/res/values-uk-rUA/strings.xml
+3
-0
strings.xml
app/src/main/res/values/strings.xml
+2
-0
No files found.
app/src/main/java/chat/rocket/android/chatroom/adapter/BaseViewHolder.kt
View file @
fcb3b431
...
...
@@ -18,7 +18,6 @@ import com.google.android.flexbox.FlexboxLayoutManager
import
ru.whalemare.sheetmenu.extension.inflate
import
ru.whalemare.sheetmenu.extension.toList
abstract
class
BaseViewHolder
<
T
:
BaseViewModel
<*>>(
itemView
:
View
,
private
val
listener
:
ActionsListener
,
...
...
@@ -78,16 +77,23 @@ abstract class BaseViewHolder<T : BaseViewModel<*>>(
private
val
onClickListener
=
{
view
:
View
->
if
(
data
?.
message
?.
isSystemMessage
()
==
false
)
{
data
?.
message
?.
let
{
val
menuItems
=
view
.
context
.
inflate
(
R
.
menu
.
message_actions
).
toList
()
menuItems
.
find
{
it
.
itemId
==
R
.
id
.
action_menu_msg_pin_unpin
}
?.
apply
{
val
isPinned
=
data
?.
message
?.
pinned
?:
false
setTitle
(
if
(
isPinned
)
R
.
string
.
action_msg_unpin
else
R
.
string
.
action_msg_pin
)
isChecked
=
isPinned
menuItems
.
find
{
it
.
itemId
==
R
.
id
.
action_message_unpin
}
?.
apply
{
setTitle
(
if
(
it
.
pinned
)
R
.
string
.
action_msg_unpin
else
R
.
string
.
action_msg_pin
)
isChecked
=
it
.
pinned
}
menuItems
.
find
{
it
.
itemId
==
R
.
id
.
action_message_star
}
?.
apply
{
val
isStarred
=
it
.
starred
?.
isNotEmpty
()
?:
false
setTitle
(
if
(
isStarred
)
R
.
string
.
action_msg_unstar
else
R
.
string
.
action_msg_star
)
isChecked
=
isStarred
}
val
adapter
=
ActionListAdapter
(
menuItems
,
this
@BaseViewHolder
)
BottomSheetMenu
(
adapter
).
show
(
view
.
context
)
}
}
}
internal
fun
setupActionMenu
(
view
:
View
)
{
if
(
listener
.
isActionsEnabled
())
{
...
...
app/src/main/java/chat/rocket/android/chatroom/adapter/ChatRoomAdapter.kt
View file @
fcb3b431
...
...
@@ -181,25 +181,39 @@ class ChatRoomAdapter(
}
private
val
actionsListener
=
object
:
BaseViewHolder
.
ActionsListener
{
override
fun
isActionsEnabled
():
Boolean
=
enableActions
override
fun
onActionSelected
(
item
:
MenuItem
,
message
:
Message
)
{
message
.
apply
{
when
(
item
.
itemId
)
{
R
.
id
.
action_menu_msg_delete
->
presenter
?.
deleteMessage
(
roomId
,
id
)
R
.
id
.
action_menu_msg_quote
->
presenter
?.
citeMessage
(
roomType
,
id
,
false
)
R
.
id
.
action_menu_msg_reply
->
presenter
?.
citeMessage
(
roomType
,
id
,
true
)
R
.
id
.
action_menu_msg_copy
->
presenter
?.
copyMessage
(
id
)
R
.
id
.
action_menu_msg_edit
->
presenter
?.
editMessage
(
roomId
,
id
,
message
.
message
)
R
.
id
.
action_menu_msg_pin_unpin
->
{
with
(
item
)
{
if
(!
isChecked
)
{
R
.
id
.
action_message_reply
->
{
presenter
?.
citeMessage
(
roomType
,
id
,
true
)
}
R
.
id
.
action_message_quote
->
{
presenter
?.
citeMessage
(
roomType
,
id
,
false
)
}
R
.
id
.
action_message_copy
->
{
presenter
?.
copyMessage
(
id
)
}
R
.
id
.
action_message_edit
->
{
presenter
?.
editMessage
(
roomId
,
id
,
message
.
message
)
}
R
.
id
.
action_message_star
->
{
if
(!
item
.
isChecked
)
{
presenter
?.
starMessage
(
id
)
}
else
{
presenter
?.
unstarMessage
(
id
)
}
}
R
.
id
.
action_message_unpin
->
{
if
(!
item
.
isChecked
)
{
presenter
?.
pinMessage
(
id
)
}
else
{
presenter
?.
unpinMessage
(
id
)
}
}
}
R
.
id
.
action_message_delete
->
presenter
?.
deleteMessage
(
roomId
,
id
)
R
.
id
.
action_menu_msg_react
->
presenter
?.
showReactions
(
id
)
else
->
TODO
(
"Not implemented"
)
}
...
...
app/src/main/java/chat/rocket/android/chatroom/adapter/MessageViewHolder.kt
View file @
fcb3b431
...
...
@@ -3,6 +3,7 @@ package chat.rocket.android.chatroom.adapter
import
android.graphics.Color
import
android.text.method.LinkMovementMethod
import
android.view.View
import
androidx.core.view.isVisible
import
chat.rocket.android.chatroom.viewmodel.MessageViewModel
import
chat.rocket.android.util.extensions.setVisible
import
chat.rocket.android.widget.emoji.EmojiReactionListener
...
...
@@ -35,10 +36,9 @@ class MessageViewHolder(
text_content
.
setTextColor
(
if
(
data
.
isTemporary
)
Color
.
GRAY
else
Color
.
BLACK
)
if
(!
data
.
message
.
isSystemMessage
()
&&
data
.
message
.
editedBy
!=
null
){
text_edit_indicator
.
setVisible
(
true
)
}
else
{
text_edit_indicator
.
setVisible
(
false
)
data
.
message
.
let
{
text_edit_indicator
.
isVisible
=
it
.
isSystemMessage
()
&&
it
.
editedBy
!=
null
image_star_indicator
.
isVisible
=
it
.
starred
?.
isNotEmpty
()
?:
false
}
}
}
...
...
app/src/main/java/chat/rocket/android/chatroom/presentation/ChatRoomPresenter.kt
View file @
fcb3b431
...
...
@@ -152,6 +152,7 @@ class ChatRoomPresenter @Inject constructor(
groupable
=
false
,
parseUrls
=
false
,
pinned
=
false
,
starred
=
emptyList
(),
mentions
=
emptyList
(),
reactions
=
null
,
senderAlias
=
null
,
...
...
@@ -416,6 +417,34 @@ class ChatRoomPresenter @Inject constructor(
}
}
fun
starMessage
(
messageId
:
String
)
{
launchUI
(
strategy
)
{
if
(!
permissions
.
allowedMessageStarring
())
{
view
.
showMessage
(
R
.
string
.
permission_starring_not_allowed
)
return
@launchUI
}
try
{
retryIO
(
"starMessage($messageId)"
)
{
client
.
starMessage
(
messageId
)
}
}
catch
(
e
:
RocketChatException
)
{
Timber
.
e
(
e
)
}
}
}
fun
unstarMessage
(
messageId
:
String
)
{
launchUI
(
strategy
)
{
if
(!
permissions
.
allowedMessageStarring
())
{
view
.
showMessage
(
R
.
string
.
permission_starring_not_allowed
)
return
@launchUI
}
try
{
retryIO
(
"unstarMessage($messageId)"
)
{
client
.
unstarMessage
(
messageId
)
}
}
catch
(
e
:
RocketChatException
)
{
Timber
.
e
(
e
)
}
}
}
fun
pinMessage
(
messageId
:
String
)
{
launchUI
(
strategy
)
{
if
(!
permissions
.
allowedMessagePinning
())
{
...
...
app/src/main/java/chat/rocket/android/chatroom/ui/bottomsheet/adapter/ActionListAdapter.kt
View file @
fcb3b431
...
...
@@ -7,8 +7,10 @@ import chat.rocket.android.util.extensions.setVisible
/**
* An adapter for bottomsheet menu that lists all the actions that could be taken over a chat message.
*/
class
ActionListAdapter
(
menuItems
:
List
<
MenuItem
>
=
emptyList
(),
callback
:
MenuItem
.
OnMenuItemClickListener
)
:
ListBottomSheetAdapter
(
menuItems
=
menuItems
,
callback
=
callback
)
{
class
ActionListAdapter
(
menuItems
:
List
<
MenuItem
>
=
emptyList
(),
callback
:
MenuItem
.
OnMenuItemClickListener
)
:
ListBottomSheetAdapter
(
menuItems
=
menuItems
,
callback
=
callback
)
{
override
fun
onBindViewHolder
(
holder
:
ViewHolder
,
position
:
Int
)
{
val
item
=
menuItems
[
position
]
...
...
@@ -25,7 +27,11 @@ class ActionListAdapter(menuItems: List<MenuItem> = emptyList(), callback: MenuI
callback
?.
onMenuItemClick
(
item
)
}
val
deleteTextColor
=
holder
.
itemView
.
context
.
resources
.
getColor
(
R
.
color
.
red
)
val
color
=
if
(
item
.
itemId
==
R
.
id
.
action_menu_msg_delete
)
deleteTextColor
else
textColors
.
get
(
item
.
itemId
)
val
color
=
if
(
item
.
itemId
==
R
.
id
.
action_message_delete
)
{
deleteTextColor
}
else
{
textColors
.
get
(
item
.
itemId
)
}
holder
.
textTitle
.
setTextColor
(
color
)
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/pinnedmessages/presentation/PinnedMessagesPresenter.kt
View file @
fcb3b431
...
...
@@ -8,7 +8,7 @@ import chat.rocket.android.server.infraestructure.RocketChatClientFactory
import
chat.rocket.android.util.extensions.launchUI
import
chat.rocket.common.RocketChatException
import
chat.rocket.common.util.ifNull
import
chat.rocket.core.internal.rest.get
Room
PinnedMessages
import
chat.rocket.core.internal.rest.getPinnedMessages
import
chat.rocket.core.model.isSystemMessage
import
timber.log.Timber
import
javax.inject.Inject
...
...
@@ -37,7 +37,7 @@ class PinnedMessagesPresenter @Inject constructor(
chatRoom
?.
let
{
room
->
view
.
showLoading
()
val
pinnedMessages
=
client
.
get
Room
PinnedMessages
(
roomId
,
room
.
type
,
pinnedMessagesListOffset
)
client
.
getPinnedMessages
(
roomId
,
room
.
type
,
pinnedMessagesListOffset
)
pinnedMessagesListOffset
=
pinnedMessages
.
offset
.
toInt
()
val
messageList
=
mapper
.
map
(
pinnedMessages
.
result
.
filterNot
{
it
.
isSystemMessage
()
})
view
.
showPinnedMessages
(
messageList
)
...
...
app/src/main/java/chat/rocket/android/push/PushManager.kt
View file @
fcb3b431
...
...
@@ -291,7 +291,7 @@ class PushManager @Inject constructor(
.
setLabel
(
replyTextHint
)
.
build
()
val
pendingIntent
=
getReplyPendingIntent
(
pushMessage
)
val
replyAction
=
NotificationCompat
.
Action
.
Builder
(
R
.
drawable
.
ic_
reply_black_24px
,
replyTextHint
,
pendingIntent
)
val
replyAction
=
NotificationCompat
.
Action
.
Builder
(
R
.
drawable
.
ic_
action_message_reply_24dp
,
replyTextHint
,
pendingIntent
)
.
addRemoteInput
(
replyRemoteInput
)
.
setAllowGeneratedReplies
(
true
)
.
build
()
...
...
app/src/main/java/chat/rocket/android/server/domain/PermissionsInteractor.kt
View file @
fcb3b431
...
...
@@ -32,20 +32,25 @@ class PermissionsInteractor @Inject constructor(
}
/**
* Check whether user is allowed to delete a message.
* Check whether
the
user is allowed to delete a message.
*/
fun
allowedMessageDeleting
()
=
publicSettings
()
?.
allowedMessageDeleting
()
?:
false
/**
* Checks whether user is allowed to edit a message.
* Checks whether
the
user is allowed to edit a message.
*/
fun
allowedMessageEditing
()
=
publicSettings
()
?.
allowedMessageEditing
()
?:
false
/**
* Checks whether user is allowed to pin a message to a channel.
* Checks whether
the
user is allowed to pin a message to a channel.
*/
fun
allowedMessagePinning
()
=
publicSettings
()
?.
allowedMessagePinning
()
?:
false
/**
* Checks whether the user is allowed to star a message.
*/
fun
allowedMessageStarring
()
=
publicSettings
()
?.
allowedMessageStarring
()
?:
false
/**
* Checks whether should show deleted message status.
*/
...
...
app/src/main/java/chat/rocket/android/server/domain/RefreshSettingsInteractor.kt
View file @
fcb3b431
...
...
@@ -24,7 +24,7 @@ class RefreshSettingsInteractor @Inject constructor(
FAVORITE_ROOMS
,
UPLOAD_STORAGE_TYPE
,
UPLOAD_MAX_FILE_SIZE
,
UPLOAD_WHITELIST_MIMETYPES
,
HIDE_USER_JOIN
,
HIDE_USER_LEAVE
,
HIDE_TYPE_AU
,
HIDE_MUTE_UNMUTE
,
HIDE_TYPE_RU
,
ALLOW_MESSAGE_DELETING
,
ALLOW_MESSAGE_EDITING
,
ALLOW_MESSAGE_PINNING
,
SHOW_DELETED_STATUS
,
SHOW_EDITED_STATUS
,
ALLOW_MESSAGE_EDITING
,
ALLOW_MESSAGE_PINNING
,
ALLOW_MESSAGE_STARRING
,
SHOW_DELETED_STATUS
,
SHOW_EDITED_STATUS
,
WIDE_TILE_310
,
STORE_LAST_MESSAGE
)
suspend
fun
refresh
(
server
:
String
)
{
...
...
app/src/main/java/chat/rocket/android/server/domain/SettingsRepository.kt
View file @
fcb3b431
...
...
@@ -49,6 +49,7 @@ const val ALLOW_MESSAGE_EDITING = "Message_AllowEditing"
const
val
SHOW_DELETED_STATUS
=
"Message_ShowDeletedStatus"
const
val
SHOW_EDITED_STATUS
=
"Message_ShowEditedStatus"
const
val
ALLOW_MESSAGE_PINNING
=
"Message_AllowPinning"
const
val
ALLOW_MESSAGE_STARRING
=
"Message_AllowStarring"
const
val
STORE_LAST_MESSAGE
=
"Store_Last_Message"
/*
...
...
@@ -83,6 +84,7 @@ fun PublicSettings.wideTile(): String? = this[WIDE_TILE_310]?.value as String?
fun
PublicSettings
.
showDeletedStatus
():
Boolean
=
this
[
SHOW_DELETED_STATUS
]
?.
value
==
true
fun
PublicSettings
.
showEditedStatus
():
Boolean
=
this
[
SHOW_EDITED_STATUS
]
?.
value
==
true
fun
PublicSettings
.
allowedMessagePinning
():
Boolean
=
this
[
ALLOW_MESSAGE_PINNING
]
?.
value
==
true
fun
PublicSettings
.
allowedMessageStarring
():
Boolean
=
this
[
ALLOW_MESSAGE_STARRING
]
?.
value
==
true
fun
PublicSettings
.
allowedMessageEditing
():
Boolean
=
this
[
ALLOW_MESSAGE_EDITING
]
?.
value
==
true
fun
PublicSettings
.
allowedMessageDeleting
():
Boolean
=
this
[
ALLOW_MESSAGE_DELETING
]
?.
value
==
true
...
...
app/src/main/res/drawable/ic_
content_copy_black_24px
.xml
→
app/src/main/res/drawable/ic_
action_message_copy_24dp
.xml
View file @
fcb3b431
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"24.0"
android:viewportHeight=
"24.0"
>
android:viewportHeight=
"24.0"
android:viewportWidth=
"24.0"
>
<path
android:
pathData=
"M16,1L4,1c-1.1,0 -2,0.9 -2,2v14h2L4,3h12L16,1zM19,5L8,5c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h11c1.1,0 2,-0.9 2,-2L21,7c0,-1.1 -0.9,-2 -2,-2zM19,21L8,21L8,7h11v14z
"
android:
fillColor=
"@color/actionMenuColor"
/>
android:
fillColor=
"@color/actionMenuColor
"
android:
pathData=
"M16,1L4,1c-1.1,0 -2,0.9 -2,2v14h2L4,3h12L16,1zM19,5L8,5c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h11c1.1,0 2,-0.9 2,-2L21,7c0,-1.1 -0.9,-2 -2,-2zM19,21L8,21L8,7h11v14z"
/>
</vector>
\ No newline at end of file
app/src/main/res/drawable/ic_
delete_black_24px
.xml
→
app/src/main/res/drawable/ic_
action_message_delete_24dp
.xml
View file @
fcb3b431
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"24.0"
android:viewportHeight=
"24.0"
>
android:viewportHeight=
"24.0"
android:viewportWidth=
"24.0"
>
<path
android:
pathData=
"M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2V7H6v12zM19,4h-3.5l-1,-1h-5l-1,1H5v2h14V4z
"
android:
fillColor=
"#FF0000"
/>
android:
fillColor=
"#FF0000
"
android:
pathData=
"M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2V7H6v12zM19,4h-3.5l-1,-1h-5l-1,1H5v2h14V4z"
/>
</vector>
app/src/main/res/drawable/ic_
edit_black_24px
.xml
→
app/src/main/res/drawable/ic_
action_message_edit_24dp
.xml
View file @
fcb3b431
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"24.0"
android:viewportHeight=
"24.0"
>
android:viewportHeight=
"24.0"
android:viewportWidth=
"24.0"
>
<path
android:
pathData=
"M3,17.25V21h3.75L17.81,9.94l-3.75,-3.75L3,17.25zM20.71,7.04c0.39,-0.39 0.39,-1.02 0,-1.41l-2.34,-2.34c-0.39,-0.39 -1.02,-0.39 -1.41,0l-1.83,1.83 3.75,3.75 1.83,-1.83z
"
android:
fillColor=
"@color/actionMenuColor"
/>
android:
fillColor=
"@color/actionMenuColor
"
android:
pathData=
"M3,17.25V21h3.75L17.81,9.94l-3.75,-3.75L3,17.25zM20.71,7.04c0.39,-0.39 0.39,-1.02 0,-1.41l-2.34,-2.34c-0.39,-0.39 -1.02,-0.39 -1.41,0l-1.83,1.83 3.75,3.75 1.83,-1.83z"
/>
</vector>
\ No newline at end of file
app/src/main/res/drawable/ic_action_message_pin_24dp.xml
0 → 100644
View file @
fcb3b431
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportHeight=
"24"
android:viewportWidth=
"24"
>
<path
android:fillColor=
"@color/actionMenuColor"
android:pathData=
"M16,12V4H17V2H7V4H8V12L6,14V16H11.2V22H12.8V16H18V14L16,12Z"
/>
</vector>
\ No newline at end of file
app/src/main/res/drawable/ic_
quote_black_24px
.xml
→
app/src/main/res/drawable/ic_
action_message_quote_24dp
.xml
View file @
fcb3b431
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"24.0"
android:viewportHeight=
"24.0"
>
android:viewportHeight=
"24.0"
android:viewportWidth=
"24.0"
>
<path
android:
pathData=
"M6,17h3l2,-4L11,7L5,7v6h3zM14,17h3l2,-4L19,7h-6v6h3z
"
android:
fillColor=
"@color/actionMenuColor"
/>
android:
fillColor=
"@color/actionMenuColor
"
android:
pathData=
"M6,17h3l2,-4L11,7L5,7v6h3zM14,17h3l2,-4L19,7h-6v6h3z"
/>
</vector>
\ No newline at end of file
app/src/main/res/drawable/ic_
reply_black_24px
.xml
→
app/src/main/res/drawable/ic_
action_message_reply_24dp
.xml
View file @
fcb3b431
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"24.0"
android:viewportHeight=
"24.0"
>
android:viewportHeight=
"24.0"
android:viewportWidth=
"24.0"
>
<path
android:
pathData=
"M10,9V5l-7,7 7,7v-4.1c5,0 8.5,1.6 11,5.1 -1,-5 -4,-10 -11,-11z
"
android:
fillColor=
"@color/actionMenuColor"
/>
android:
fillColor=
"@color/actionMenuColor
"
android:
pathData=
"M10,9V5l-7,7 7,7v-4.1c5,0 8.5,1.6 11,5.1 -1,-5 -4,-10 -11,-11z"
/>
</vector>
\ No newline at end of file
app/src/main/res/drawable/ic_
star_black_24px
.xml
→
app/src/main/res/drawable/ic_
action_message_star_24dp
.xml
View file @
fcb3b431
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"24.0"
android:viewportHeight=
"24.0"
>
android:viewportHeight=
"24.0"
android:viewportWidth=
"24.0"
>
<path
android:
pathData=
"M12,17.27L18.18,21l-1.64,-7.03L22,9.24l-7.19,-0.61L12,2 9.19,8.63 2,9.24l5.46,4.73L5.82,21z
"
android:
fillColor=
"@color/actionMenuColor"
/>
android:
fillColor=
"@color/actionMenuColor
"
android:
pathData=
"M12,17.27L18.18,21l-1.64,-7.03L22,9.24l-7.19,-0.61L12,2 9.19,8.63 2,9.24l5.46,4.73L5.82,21z"
/>
</vector>
\ No newline at end of file
app/src/main/res/drawable/ic_pin_black_24dp.xml
deleted
100644 → 0
View file @
fe7af2e5
<?xml version="1.0" encoding="utf-8"?>
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:viewportWidth=
"197.218"
android:viewportHeight=
"197.218"
android:width=
"197.218dp"
android:height=
"197.218dp"
>
<group
android:translateX=
"-570.396"
android:translateY=
"-306.782"
>
<path
android:pathData=
"M704.445 306.782l-6.785 6.785c-6.084 6.084 -7.622 14.712 -4.309 21.871l-44.068 35.44 -3.086 -3.086c-7.889 -7.889 -19.525 -7.889 -27.414 0l-8.944 8.953 87.821 87.811 8.934 -8.933c7.899 -7.899 7.899 -19.525 0 -27.433l-3.076 -3.077 36.051 -44.68c6.824 2.466 14.367 1.036 20.037 -4.624l8.008 -5.858 -63.169 -63.169zm-66.867 116.487l-67.182 66.857 0 13.874 13.864 0 66.867 -67.182 -13.549 -13.549z"
android:fillColor=
"@color/actionMenuColor"
/>
</group>
</vector>
\ No newline at end of file
app/src/main/res/layout/fragment_pinned_messages.xml
View file @
fcb3b431
...
...
@@ -36,7 +36,7 @@
android:id=
"@+id/iv_pin_icon"
android:layout_width=
"100dp"
android:layout_height=
"100dp"
android:src=
"@drawable/ic_
pin_black
_24dp"
android:src=
"@drawable/ic_
action_message_pin
_24dp"
android:tint=
"@color/icon_grey"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
...
...
app/src/main/res/layout/item_message.xml
View file @
fcb3b431
...
...
@@ -7,11 +7,11 @@
android:layout_height=
"wrap_content"
android:background=
"?android:attr/selectableItemBackground"
android:clickable=
"true"
android:paddingStart=
"@dimen/screen_edge_left_and_right_padding"
android:paddingEnd=
"@dimen/screen_edge_left_and_right_padding"
android:paddingTop=
"@dimen/message_item_top_and_bottom_padding"
android:focusable=
"true"
android:paddingBottom=
"@dimen/message_item_top_and_bottom_padding"
android:focusable=
"true"
>
android:paddingEnd=
"@dimen/screen_edge_left_and_right_padding"
android:paddingStart=
"@dimen/screen_edge_left_and_right_padding"
android:paddingTop=
"@dimen/message_item_top_and_bottom_padding"
>
<include
android:id=
"@+id/layout_avatar"
...
...
@@ -20,36 +20,39 @@
android:layout_height=
"40dp"
android:layout_marginTop=
"5dp"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/new_messages_notif"
/>
app:layout_constraintTop_toBottomOf=
"@
+
id/new_messages_notif"
/>
<LinearLayout
android:id=
"@+id/new_messages_notif"
tools:visibility=
"visible"
android:visibility=
"gone"
android:orientation=
"horizontal"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
android:visibility=
"gone"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
>
app:layout_constraintTop_toTopOf=
"parent"
tools:visibility=
"visible"
>
<View
android:layout_gravity=
"center"
android:layout_height=
"1dp"
android:layout_width=
"0dp"
android:layout_weight=
"1"
android:layout_height=
"1dp"
android:layout_gravity=
"center"
android:layout_marginEnd=
"4dp"
android:background=
"@color/red"
/>
android:layout_weight=
"1"
android:background=
"@color/red"
/>
<TextView
android:layout_width=
"wrap_content"
android:text=
"@string/msg_unread_messages"
android:layout_height=
"wrap_content"
android:text=
"@string/msg_unread_messages"
android:textColor=
"@color/red"
/>
<View
android:layout_gravity=
"center"
android:layout_height=
"1dp"
android:layout_width=
"0dp"
android:layout_weight=
"1"
android:layout_height=
"1dp"
android:layout_gravity=
"center"
android:layout_marginStart=
"4dp"
android:background=
"@color/red"
/>
android:layout_weight=
"1"
android:background=
"@color/red"
/>
</LinearLayout>
<LinearLayout
...
...
@@ -58,8 +61,8 @@
android:layout_height=
"wrap_content"
android:layout_marginStart=
"16dp"
android:orientation=
"horizontal"
app:layout_constraint
Top_toBottomOf=
"@id/new_messages_notif
"
app:layout_constraint
Left_toRightOf=
"@+id/layout_avatar
"
>
app:layout_constraint
Left_toRightOf=
"@+id/layout_avatar
"
app:layout_constraint
Top_toBottomOf=
"@+id/new_messages_notif
"
>
<TextView
android:id=
"@+id/text_sender"
...
...
@@ -80,11 +83,22 @@
android:id=
"@+id/text_edit_indicator"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@string/msg_edited"
android:layout_marginStart=
"8dp"
android:text=
"@string/msg_edited"
android:textStyle=
"italic"
android:visibility=
"gone"
tools:visibility=
"visible"
/>
<ImageView
android:id=
"@+id/image_star_indicator"
android:layout_width=
"14dp"
android:layout_height=
"14dp"
android:layout_gravity=
"center_vertical"
android:layout_marginStart=
"8dp"
android:layout_marginTop=
"2dp"
android:src=
"@drawable/ic_action_message_star_24dp"
android:visibility=
"gone"
tools:visibility=
"visible"
/>
</LinearLayout>
<TextView
...
...
@@ -94,12 +108,13 @@
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"2dp"
android:layout_marginTop=
"5dp"
app:layout_constraintLeft_toLeftOf=
"@id/top_container"
app:layout_constraintLeft_toLeftOf=
"@
+
id/top_container"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/top_container"
tools:text=
"This is a multiline chat message from Bertie that will take more than just one line of text. I have sure that everything is amazing!"
/>
<include
layout=
"@layout/layout_reactions"
<include
layout=
"@layout/layout_reactions"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
app:layout_constraintEnd_toEndOf=
"@+id/text_content"
...
...
app/src/main/res/menu/message_actions.xml
View file @
fcb3b431
<?xml version="1.0" encoding="utf-8"?>
<menu
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<group
android:id=
"@+id/common_actions"
>
<item
android:id=
"@+id/action_menu_msg
_reply"
android:icon=
"@drawable/ic_reply_black_24px
"
android:id=
"@+id/action_message
_reply"
android:icon=
"@drawable/ic_action_message_reply_24dp
"
android:title=
"@string/action_msg_reply"
/>
<item
android:id=
"@+id/action_menu_msg
_quote"
android:icon=
"@drawable/ic_quote_black_24px
"
android:id=
"@+id/action_message
_quote"
android:icon=
"@drawable/ic_action_message_quote_24dp
"
android:title=
"@string/action_msg_quote"
/>
<item
android:id=
"@+id/action_menu_msg_edit"
android:icon=
"@drawable/ic_edit_black_24px"
android:title=
"@string/action_msg_edit"
/>
<item
android:id=
"@+id/action_menu_msg_copy"
android:icon=
"@drawable/ic_content_copy_black_24px"
android:id=
"@+id/action_message_copy"
android:icon=
"@drawable/ic_action_message_copy_24dp"
android:title=
"@string/action_msg_copy"
/>
<item
...
...
@@ -33,20 +27,22 @@
<!--android:title="@string/action_msg_share" />-->
<item
android:id=
"@+id/action_menu_msg_pin_unpin"
android:icon=
"@drawable/ic_pin_black_24dp"
android:id=
"@+id/action_message_star"
android:icon=
"@drawable/ic_action_message_star_24dp"
android:title=
"@string/action_msg_star"
/>
<item
android:id=
"@+id/action_message_unpin"
android:icon=
"@drawable/ic_action_message_pin_24dp"
android:title=
"@string/action_msg_pin"
/>
<!--<item-->
<!--android:id="@+id/action_menu_msg_star"-->
<!--andrtextIconicon="@drawable/ic_star_black_24px"-->
<!--android:title="@string/action_msg_star" />-->
</group>
<item
android:id=
"@+id/action_message_edit"
android:icon=
"@drawable/ic_action_message_edit_24dp"
android:title=
"@string/action_msg_edit"
/>
<group
android:id=
"@+id/dangerous_actions"
>
<item
android:id=
"@+id/action_menu_msg
_delete"
android:icon=
"@drawable/ic_delete_black_24px
"
android:id=
"@+id/action_message
_delete"
android:icon=
"@drawable/ic_action_message_delete_24dp
"
android:title=
"@string/action_msg_delete"
/>
</group>
</menu>
\ No newline at end of file
app/src/main/res/values-es/strings.xml
View file @
fcb3b431
...
...
@@ -134,6 +134,8 @@
<string
name=
"action_msg_pin"
>
Fijar mensaje
</string>
<string
name=
"action_msg_unpin"
>
Soltar mensaje
</string>
<string
name=
"action_msg_star"
>
Star mensaje
</string>
// TODO: Add proper translation.
<string
name=
"action_msg_unstar"
>
Unstar Message
</string>
<string
name=
"action_msg_share"
>
Compartir
</string>
<string
name=
"action_title_editing"
>
Edición de mensaje
</string>
<string
name=
"action_msg_add_reaction"
>
Añadir una reacción
</string>
...
...
@@ -142,6 +144,8 @@
<string
name=
"permission_editing_not_allowed"
>
La edición no és permitida
</string>
<string
name=
"permission_deleting_not_allowed"
>
Eliminar no és permitido
</string>
<string
name=
"permission_pinning_not_allowed"
>
Fijar no és permitido
</string>
// TODO: Add proper translation.
<string
name=
"permission_starring_not_allowed"
>
Starring is not allowed
</string>
<!-- Members List -->
<string
name=
"title_members_list"
>
Lista de miembros
</string>
...
...
app/src/main/res/values-fr/strings.xml
View file @
fcb3b431
...
...
@@ -133,7 +133,10 @@
<string
name=
"action_msg_delete"
>
Effacer
</string>
<string
name=
"action_msg_pin"
>
Épingle message
</string>
<string
name=
"action_msg_unpin"
>
Enlever message
</string>
// TODO: Add proper translation.
<string
name=
"action_msg_star"
>
Star message
</string>
// TODO: Add proper translation.
<string
name=
"action_msg_unstar"
>
Unstar Message
</string>
<string
name=
"action_msg_share"
>
Partager
</string>
<string
name=
"action_title_editing"
>
Modification du message
</string>
<string
name=
"action_msg_add_reaction"
>
Ajouter une réaction
</string>
...
...
@@ -142,6 +145,8 @@
<string
name=
"permission_editing_not_allowed"
>
L\'édition n\'est pas autorisée
</string>
<string
name=
"permission_deleting_not_allowed"
>
La suppression n\'est pas autorisée
</string>
<string
name=
"permission_pinning_not_allowed"
>
L\'épinglage n\'est pas autorisé
</string>
// TODO: Add proper translation.
<string
name=
"permission_starring_not_allowed"
>
Starring is not allowed
</string>
<!-- Members List -->
<string
name=
"title_members_list"
>
Liste des membres
</string>
...
...
app/src/main/res/values-hi-rIN/strings.xml
View file @
fcb3b431
...
...
@@ -136,6 +136,8 @@
<string
name=
"action_msg_pin"
>
संदेश को पिन करें
</string>
<string
name=
"action_msg_unpin"
>
संदेश को पिन से हटाएँ
</string>
<string
name=
"action_msg_star"
>
संदेश को स्टार करें
</string>
// TODO: Add proper translation.
<string
name=
"action_msg_unstar"
>
Unstar Message
</string>
<string
name=
"action_msg_share"
>
शेयर करें
</string>
<string
name=
"action_title_editing"
>
संपादन संदेश
</string>
<string
name=
"action_msg_add_reaction"
>
प्रतिक्रिया जोड़ें
</string>
...
...
@@ -144,6 +146,8 @@
<string
name=
"permission_editing_not_allowed"
>
संपादन की अनुमति नहीं है
</string>
<string
name=
"permission_deleting_not_allowed"
>
हटाने की अनुमति नहीं है
</string>
<string
name=
"permission_pinning_not_allowed"
>
पिनि करने की अनुमति नहीं है
</string>
// TODO: Add proper translation.
<string
name=
"permission_starring_not_allowed"
>
Starring is not allowed
</string>
<!-- Members List -->
<string
name=
"title_members_list"
>
सदस्यों की सूची
</string>
...
...
app/src/main/res/values-pt-rBR/strings.xml
View file @
fcb3b431
...
...
@@ -130,6 +130,7 @@
<string
name=
"action_msg_pin"
>
Pinar mensagem
</string>
<string
name=
"action_msg_unpin"
>
Despinar mensagem
</string>
<string
name=
"action_msg_star"
>
Favoritar mensagem
</string>
<string
name=
"action_msg_unstar"
>
Desfavoritar messagem
</string>
<string
name=
"action_msg_share"
>
Compartilhar
</string>
<string
name=
"action_title_editing"
>
Editando mensagem
</string>
<string
name=
"action_msg_add_reaction"
>
Adicionar reação
</string>
...
...
@@ -138,6 +139,7 @@
<string
name=
"permission_editing_not_allowed"
>
Edição não permitida
</string>
<string
name=
"permission_deleting_not_allowed"
>
Remoção não permitida
</string>
<string
name=
"permission_pinning_not_allowed"
>
Pinagem não permitida
</string>
<string
name=
"permission_starring_not_allowed"
>
Favoritar não permitido
</string>
<!-- Members List -->
<string
name=
"title_members_list"
>
Lista de Membros
</string>
...
...
app/src/main/res/values-uk-rUA/strings.xml
View file @
fcb3b431
...
...
@@ -131,6 +131,7 @@
<string
name=
"action_msg_pin"
>
Pin Message
</string>
<string
name=
"action_msg_unpin"
>
Unpin Message
</string>
<string
name=
"action_msg_star"
>
Star Message
</string>
<string
name=
"action_msg_unstar"
>
Unstar Message
</string>
<string
name=
"action_msg_share"
>
Share
</string>
<string
name=
"action_title_editing"
>
Editing Message
</string>
<string
name=
"action_msg_add_reaction"
>
Add reaction
</string>
...
...
@@ -139,6 +140,8 @@
<string
name=
"permission_editing_not_allowed"
>
Editing is not allowed
</string>
<string
name=
"permission_deleting_not_allowed"
>
Deleting is not allowed
</string>
<string
name=
"permission_pinning_not_allowed"
>
Pinning is not allowed
</string>
// TODO: Add proper translation.
<string
name=
"permission_starring_not_allowed"
>
Starring is not allowed
</string>
<!-- Members List -->
<string
name=
"title_members_list"
>
Members List
</string>
...
...
app/src/main/res/values/strings.xml
View file @
fcb3b431
...
...
@@ -131,6 +131,7 @@
<string
name=
"action_msg_pin"
>
Pin Message
</string>
<string
name=
"action_msg_unpin"
>
Unpin Message
</string>
<string
name=
"action_msg_star"
>
Star Message
</string>
<string
name=
"action_msg_unstar"
>
Unstar Message
</string>
<string
name=
"action_msg_share"
>
Share
</string>
<string
name=
"action_title_editing"
>
Editing Message
</string>
<string
name=
"action_msg_add_reaction"
>
Add reaction
</string>
...
...
@@ -139,6 +140,7 @@
<string
name=
"permission_editing_not_allowed"
>
Editing is not allowed
</string>
<string
name=
"permission_deleting_not_allowed"
>
Deleting is not allowed
</string>
<string
name=
"permission_pinning_not_allowed"
>
Pinning is not allowed
</string>
<string
name=
"permission_starring_not_allowed"
>
Starring is not allowed
</string>
<!-- Members List -->
<string
name=
"title_members_list"
>
Members List
</string>
...
...
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