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

Display stickers on the rooms #2119

Merged
merged 5 commits into from
Mar 29, 2018
Merged

Display stickers on the rooms #2119

merged 5 commits into from
Mar 29, 2018

Conversation

Tyuoli
Copy link
Contributor

@Tyuoli Tyuoli commented Mar 28, 2018

@Tyuoli Tyuoli requested review from manuroe and giomfo March 28, 2018 12:37
@ylecollen
Copy link
Contributor

ylecollen commented Mar 28, 2018

see my comments in matrix-org/matrix-android-sdk#247

the code could be simplied a lot with the right inheritage.

@@ -1263,20 +1275,33 @@ private View getImageVideoView(int type, final int position, View convertView, V
MessageRow row = getItem(position);
Event event = row.getEvent();

Message message;
Message message = new Message();
Copy link
Member

Choose a reason for hiding this comment

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

The code was better before

R.layout.adapter_item_vector_message_merge,
R.layout.adapter_item_vector_message_image_video,
Copy link
Member

Choose a reason for hiding this comment

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

What did you have move adapter_item_vector_message_image_video?
It now appears twice.

@@ -243,6 +245,37 @@ void managePendingImageVideoDownload(final View convertView, final Event event,
thumbHeight = videoMessage.info.thumbnail_info.h;
}
}
} else if (message instanceof StickerMessage) {
Copy link
Member

Choose a reason for hiding this comment

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

This code should be useless now, no?
Plus I am wondering if the condition at https://github.com/vector-im/riot-android/pull/2119/files#diff-195abc8f7f6b2882511ac16bee261c64R200 is true before going to here.

downloadId = mMediasCache.downloadIdFromUrl(((ImageMessage) message).getUrl());
} else if (message instanceof StickerMessage) {
Copy link
Member

Choose a reason for hiding this comment

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

same comment as above.

uploadingUrl = ((ImageMessage) message).getUrl();
isUploadingContent = ((ImageMessage) message).isLocalContent();
} else if (message instanceof StickerMessage) {
Copy link
Member

Choose a reason for hiding this comment

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

same comment as above.

} else {

// video
} else {
Copy link
Member

Choose a reason for hiding this comment

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

extra space

@Tyuoli Tyuoli merged commit bd0437a into develop Mar 29, 2018
@Tyuoli Tyuoli deleted the stickers branch March 29, 2018 12:50
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.

None yet

3 participants