-
Notifications
You must be signed in to change notification settings - Fork 395
Display stickers on the rooms #2119
Conversation
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(); |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra space
element-hq/riot-meta#146
#2097