Skip to content
This repository has been archived by the owner on Apr 12, 2022. It is now read-only.

Apply the new design on the room avatar and name #656

Merged
merged 13 commits into from
Oct 27, 2020
Merged

Conversation

giomfo
Copy link
Contributor

@giomfo giomfo commented Oct 25, 2020

giomfo added 10 commits October 22, 2020 21:52
- replace e2e_verified with the new icons
- fix the display of the avatars in the rooms list in case of file sharing
- Update the room activity avatar display
- Update the room access by link activity header
- Update forum avatar in the rooms directory
- Update the room activity header
@giomfo giomfo requested a review from yostyle October 25, 2020 23:52
@yostyle
Copy link
Contributor

yostyle commented Oct 26, 2020

LGTM
please check my suggestions

if (room.isEncrypted()) {
if (TextUtils.equals(roomAccessRule, RoomAccessRulesKt.RESTRICTED)) {
vRoomType.setText(R.string.tchap_room_private_room_type);
vRoomType.setTextColor(ContextCompat.getColor(context, R.color.tchap_coral_color));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's possible to use Spannable string instead of multiple textviews.

@@ -195,6 +197,28 @@ public void populateViews(final Context context,
vRoomName.setText(displayName);
}

if (null != vRoomType) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a tool function that returns the room type. This function should be used in multiple cases.
Possible room types : PRIVATE, UNRESTRICTED or EXTERN, FORUM, DISCUSSION, UNKNOWN

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, I will do it later

if (mRoom.isEncrypted()) {
if (TextUtils.equals(roomAccessRule, RoomAccessRulesKt.RESTRICTED)) {
mActionBarTypeInfo.setText(R.string.tchap_room_long_private_room_type);
mActionBarTypeInfo.setTextColor(ContextCompat.getColor(this, R.color.tchap_coral_color));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's possible to use a Spannablestring instead of multiple textviews.
https://medium.com/androiddevelopers/spantastic-text-styling-with-spans-17b0c16b4568

@giomfo giomfo merged commit 602b79d into develop Oct 27, 2020
@giomfo giomfo deleted the giomfo/room_design branch October 27, 2020 22:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants