mirror of
https://github.com/TwidereProject/Twidere-Android
synced 2025-01-19 03:29:58 +01:00
supports dm media click
This commit is contained in:
parent
7bb29e84b5
commit
ed7876a7d1
@ -21,6 +21,8 @@
|
||||
|
||||
package org.mariotaku.twidere.model;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.support.annotation.StringDef;
|
||||
|
||||
import com.bluelinelabs.logansquare.annotation.JsonField;
|
||||
@ -28,12 +30,13 @@ import com.bluelinelabs.logansquare.annotation.JsonObject;
|
||||
import com.bluelinelabs.logansquare.annotation.OnJsonParseComplete;
|
||||
import com.bluelinelabs.logansquare.annotation.OnPreJsonSerialize;
|
||||
import com.hannesdorfmann.parcelableplease.annotation.ParcelableNoThanks;
|
||||
import com.hannesdorfmann.parcelableplease.annotation.ParcelablePlease;
|
||||
|
||||
import org.mariotaku.commons.objectcursor.LoganSquareCursorFieldConverter;
|
||||
import org.mariotaku.library.objectcursor.annotation.CursorField;
|
||||
import org.mariotaku.library.objectcursor.annotation.CursorObject;
|
||||
import org.mariotaku.twidere.model.message.MessageExtras;
|
||||
import org.mariotaku.twidere.model.message.ConversationInfoUpdatedExtras;
|
||||
import org.mariotaku.twidere.model.message.MessageExtras;
|
||||
import org.mariotaku.twidere.model.message.StickerExtras;
|
||||
import org.mariotaku.twidere.model.message.UserArrayExtras;
|
||||
import org.mariotaku.twidere.model.util.MessageExtrasConverter;
|
||||
@ -46,9 +49,10 @@ import java.util.Arrays;
|
||||
/**
|
||||
* Created by mariotaku on 16/6/6.
|
||||
*/
|
||||
@ParcelablePlease
|
||||
@JsonObject
|
||||
@CursorObject(tableInfo = true, valuesCreator = true)
|
||||
public class ParcelableMessage {
|
||||
public class ParcelableMessage implements Parcelable {
|
||||
|
||||
@CursorField(value = Messages._ID, type = TwidereDataStore.TYPE_PRIMARY_KEY, excludeWrite = true)
|
||||
public long _id;
|
||||
@ -201,4 +205,26 @@ public class ParcelableMessage {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
ParcelableMessageParcelablePlease.writeToParcel(this, dest, flags);
|
||||
}
|
||||
|
||||
public static final Creator<ParcelableMessage> CREATOR = new Creator<ParcelableMessage>() {
|
||||
public ParcelableMessage createFromParcel(Parcel source) {
|
||||
ParcelableMessage target = new ParcelableMessage();
|
||||
ParcelableMessageParcelablePlease.readFromParcel(target, source);
|
||||
return target;
|
||||
}
|
||||
|
||||
public ParcelableMessage[] newArray(int size) {
|
||||
return new ParcelableMessage[size];
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -21,6 +21,8 @@
|
||||
|
||||
package org.mariotaku.twidere.model;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.support.annotation.StringDef;
|
||||
|
||||
import com.bluelinelabs.logansquare.annotation.JsonField;
|
||||
@ -28,6 +30,7 @@ import com.bluelinelabs.logansquare.annotation.JsonObject;
|
||||
import com.bluelinelabs.logansquare.annotation.OnJsonParseComplete;
|
||||
import com.bluelinelabs.logansquare.annotation.OnPreJsonSerialize;
|
||||
import com.hannesdorfmann.parcelableplease.annotation.ParcelableNoThanks;
|
||||
import com.hannesdorfmann.parcelableplease.annotation.ParcelablePlease;
|
||||
|
||||
import org.mariotaku.commons.objectcursor.LoganSquareCursorFieldConverter;
|
||||
import org.mariotaku.library.objectcursor.annotation.CursorField;
|
||||
@ -46,9 +49,10 @@ import java.util.Arrays;
|
||||
/**
|
||||
* Created by mariotaku on 16/6/6.
|
||||
*/
|
||||
@ParcelablePlease
|
||||
@JsonObject
|
||||
@CursorObject(tableInfo = true, valuesCreator = true)
|
||||
public class ParcelableMessageConversation {
|
||||
public class ParcelableMessageConversation implements Parcelable {
|
||||
@CursorField(value = Conversations._ID, type = TwidereDataStore.TYPE_PRIMARY_KEY, excludeWrite = true)
|
||||
public long _id;
|
||||
|
||||
@ -228,4 +232,26 @@ public class ParcelableMessageConversation {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
ParcelableMessageConversationParcelablePlease.writeToParcel(this, dest, flags);
|
||||
}
|
||||
|
||||
public static final Creator<ParcelableMessageConversation> CREATOR = new Creator<ParcelableMessageConversation>() {
|
||||
public ParcelableMessageConversation createFromParcel(Parcel source) {
|
||||
ParcelableMessageConversation target = new ParcelableMessageConversation();
|
||||
ParcelableMessageConversationParcelablePlease.readFromParcel(target, source);
|
||||
return target;
|
||||
}
|
||||
|
||||
public ParcelableMessageConversation[] newArray(int size) {
|
||||
return new ParcelableMessageConversation[size];
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -22,6 +22,7 @@ package org.mariotaku.twidere.adapter
|
||||
import android.content.Context
|
||||
import android.support.v7.widget.RecyclerView
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import org.apache.commons.lang3.time.DateUtils
|
||||
import org.mariotaku.kpreferences.get
|
||||
@ -36,6 +37,7 @@ import org.mariotaku.twidere.model.ParcelableMessage.MessageType
|
||||
import org.mariotaku.twidere.util.DirectMessageOnLinkClickHandler
|
||||
import org.mariotaku.twidere.util.MediaLoadingHandler
|
||||
import org.mariotaku.twidere.util.TwidereLinkify
|
||||
import org.mariotaku.twidere.view.CardMediaContainer.OnMediaClickListener
|
||||
import org.mariotaku.twidere.view.holder.message.AbsMessageViewHolder
|
||||
import org.mariotaku.twidere.view.holder.message.MessageViewHolder
|
||||
import org.mariotaku.twidere.view.holder.message.NoticeSummaryEventViewHolder
|
||||
@ -53,11 +55,18 @@ class MessagesConversationAdapter(context: Context) : LoadMoreSupportAdapter<Rec
|
||||
val nameFirst: Boolean = preferences[nameFirstKey]
|
||||
val linkify: TwidereLinkify = TwidereLinkify(DirectMessageOnLinkClickHandler(context, null, preferences))
|
||||
val mediaLoadingHandler: MediaLoadingHandler = MediaLoadingHandler()
|
||||
val mediaClickListener: OnMediaClickListener = object : OnMediaClickListener {
|
||||
override fun onMediaClick(view: View, media: ParcelableMedia, accountKey: UserKey?, id: Long) {
|
||||
listener?.onMediaClick(id.toInt(), media, accountKey)
|
||||
}
|
||||
}
|
||||
|
||||
var messages: List<ParcelableMessage>? = null
|
||||
private set
|
||||
var conversation: ParcelableMessageConversation? = null
|
||||
private set
|
||||
var listener: Listener? = null
|
||||
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
|
||||
val inflater = LayoutInflater.from(parent.context)
|
||||
@ -141,6 +150,10 @@ class MessagesConversationAdapter(context: Context) : LoadMoreSupportAdapter<Rec
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
interface Listener {
|
||||
fun onMediaClick(position: Int, media: ParcelableMedia, accountKey: UserKey?)
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val ITEM_START_MESSAGE = 0
|
||||
|
||||
|
@ -10,19 +10,19 @@ import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import kotlinx.android.synthetic.main.fragment_messages_conversation.*
|
||||
import org.mariotaku.kpreferences.get
|
||||
import org.mariotaku.sqliteqb.library.Expression
|
||||
import org.mariotaku.sqliteqb.library.OrderBy
|
||||
import org.mariotaku.twidere.R
|
||||
import org.mariotaku.twidere.adapter.MessagesConversationAdapter
|
||||
import org.mariotaku.twidere.constant.IntentConstants.EXTRA_ACCOUNT_KEY
|
||||
import org.mariotaku.twidere.constant.IntentConstants.EXTRA_CONVERSATION_ID
|
||||
import org.mariotaku.twidere.constant.newDocumentApiKey
|
||||
import org.mariotaku.twidere.loader.ObjectCursorLoader
|
||||
import org.mariotaku.twidere.model.ParcelableMessage
|
||||
import org.mariotaku.twidere.model.ParcelableMessageConversation
|
||||
import org.mariotaku.twidere.model.ParcelableMessageCursorIndices
|
||||
import org.mariotaku.twidere.model.UserKey
|
||||
import org.mariotaku.twidere.model.*
|
||||
import org.mariotaku.twidere.provider.TwidereDataStore.Messages
|
||||
import org.mariotaku.twidere.util.DataStoreUtils
|
||||
import org.mariotaku.twidere.util.IntentUtils
|
||||
import java.util.concurrent.atomic.AtomicReference
|
||||
|
||||
class MessagesConversationFragment : BaseFragment(), LoaderManager.LoaderCallbacks<List<ParcelableMessage>?> {
|
||||
@ -34,6 +34,15 @@ class MessagesConversationFragment : BaseFragment(), LoaderManager.LoaderCallbac
|
||||
override fun onActivityCreated(savedInstanceState: Bundle?) {
|
||||
super.onActivityCreated(savedInstanceState)
|
||||
adapter = MessagesConversationAdapter(context)
|
||||
adapter.listener = object : MessagesConversationAdapter.Listener {
|
||||
override fun onMediaClick(position: Int, media: ParcelableMedia, accountKey: UserKey?) {
|
||||
val message = adapter.getMessage(position) ?: return
|
||||
IntentUtils.openMediaDirectly(context = context, accountKey = accountKey,
|
||||
media = message.media, current = media,
|
||||
newDocument = preferences[newDocumentApiKey], message = message)
|
||||
}
|
||||
|
||||
}
|
||||
recyclerView.adapter = adapter
|
||||
recyclerView.layoutManager = FixedLinearLayoutManager(context, LinearLayoutManager.VERTICAL, true)
|
||||
loaderManager.initLoader(0, null, this)
|
||||
|
@ -96,8 +96,8 @@ object IntentUtils {
|
||||
}
|
||||
|
||||
fun openUserProfile(context: Context, user: ParcelableUser,
|
||||
newDocument: Boolean, @Referral referral: String? = null,
|
||||
activityOptions: Bundle? = null) {
|
||||
newDocument: Boolean, @Referral referral: String? = null,
|
||||
activityOptions: Bundle? = null) {
|
||||
val extras = Bundle()
|
||||
extras.putParcelable(EXTRA_USER, user)
|
||||
if (user.extras != null) {
|
||||
@ -117,9 +117,9 @@ object IntentUtils {
|
||||
}
|
||||
|
||||
fun openUserProfile(context: Context, accountKey: UserKey?,
|
||||
userKey: UserKey?, screenName: String?,
|
||||
newDocument: Boolean, @Referral referral: String? = null,
|
||||
activityOptions: Bundle? = null) {
|
||||
userKey: UserKey?, screenName: String?,
|
||||
newDocument: Boolean, @Referral referral: String? = null,
|
||||
activityOptions: Bundle? = null) {
|
||||
val intent = userProfile(accountKey, userKey, screenName, referral, null)
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && newDocument) {
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT)
|
||||
@ -128,7 +128,7 @@ object IntentUtils {
|
||||
}
|
||||
|
||||
fun userProfile(accountKey: UserKey?, userKey: UserKey?, screenName: String?,
|
||||
@Referral referral: String? = null, profileUrl: String?): Intent {
|
||||
@Referral referral: String? = null, profileUrl: String?): Intent {
|
||||
val uri = LinkCreator.getTwidereUserLink(accountKey, userKey, screenName)
|
||||
val intent = Intent(Intent.ACTION_VIEW, uri)
|
||||
if (referral != null) {
|
||||
@ -151,7 +151,7 @@ object IntentUtils {
|
||||
}
|
||||
|
||||
fun openUserMentions(context: Context, accountKey: UserKey?,
|
||||
screenName: String) {
|
||||
screenName: String) {
|
||||
val builder = Uri.Builder()
|
||||
builder.scheme(SCHEME_TWIDERE)
|
||||
builder.authority(AUTHORITY_USER_MENTIONS)
|
||||
@ -164,25 +164,25 @@ object IntentUtils {
|
||||
}
|
||||
|
||||
fun openMedia(context: Context, status: ParcelableStatus,
|
||||
current: ParcelableMedia? = null, newDocument: Boolean,
|
||||
displaySensitiveContents: Boolean, options: Bundle? = null) {
|
||||
current: ParcelableMedia? = null, newDocument: Boolean,
|
||||
displaySensitiveContents: Boolean, options: Bundle? = null) {
|
||||
val media = ParcelableMediaUtils.getPrimaryMedia(status) ?: return
|
||||
openMedia(context, status.account_key, status.is_possibly_sensitive, status, current,
|
||||
media, newDocument, displaySensitiveContents, options)
|
||||
}
|
||||
|
||||
fun openMedia(context: Context, accountKey: UserKey?, media: Array<ParcelableMedia>,
|
||||
current: ParcelableMedia? = null, isPossiblySensitive: Boolean,
|
||||
newDocument: Boolean, displaySensitiveContents: Boolean, options: Bundle? = null) {
|
||||
current: ParcelableMedia? = null, isPossiblySensitive: Boolean,
|
||||
newDocument: Boolean, displaySensitiveContents: Boolean, options: Bundle? = null) {
|
||||
openMedia(context, accountKey, isPossiblySensitive, null, current, media, newDocument,
|
||||
displaySensitiveContents, options)
|
||||
}
|
||||
|
||||
fun openMedia(context: Context, accountKey: UserKey?, isPossiblySensitive: Boolean,
|
||||
status: ParcelableStatus?,
|
||||
current: ParcelableMedia? = null, media: Array<ParcelableMedia>,
|
||||
newDocument: Boolean, displaySensitiveContents: Boolean,
|
||||
options: Bundle? = null) {
|
||||
status: ParcelableStatus?,
|
||||
current: ParcelableMedia? = null, media: Array<ParcelableMedia>,
|
||||
newDocument: Boolean, displaySensitiveContents: Boolean,
|
||||
options: Bundle? = null) {
|
||||
if (context is FragmentActivity && isPossiblySensitive && !displaySensitiveContents) {
|
||||
val fm = context.supportFragmentManager
|
||||
val fragment = SensitiveContentWarningDialogFragment()
|
||||
@ -204,7 +204,7 @@ object IntentUtils {
|
||||
}
|
||||
|
||||
fun openMediaDirectly(context: Context, accountKey: UserKey?, status: ParcelableStatus,
|
||||
current: ParcelableMedia, newDocument: Boolean, options: Bundle? = null) {
|
||||
current: ParcelableMedia, newDocument: Boolean, options: Bundle? = null) {
|
||||
val media = ParcelableMediaUtils.getPrimaryMedia(status) ?: return
|
||||
openMediaDirectly(context, accountKey, media, current, options, newDocument, status)
|
||||
}
|
||||
@ -248,10 +248,9 @@ object IntentUtils {
|
||||
return resolveInfo?.filter
|
||||
}
|
||||
|
||||
fun openMediaDirectly(context: Context, accountKey: UserKey?,
|
||||
media: Array<ParcelableMedia>, current: ParcelableMedia? = null,
|
||||
options: Bundle? = null, newDocument: Boolean,
|
||||
status: ParcelableStatus?) {
|
||||
fun openMediaDirectly(context: Context, accountKey: UserKey?, media: Array<ParcelableMedia>,
|
||||
current: ParcelableMedia? = null, options: Bundle? = null, newDocument: Boolean,
|
||||
status: ParcelableStatus? = null, message: ParcelableMessage? = null) {
|
||||
val intent = Intent(context, MediaViewerActivity::class.java)
|
||||
intent.putExtra(EXTRA_ACCOUNT_KEY, accountKey)
|
||||
intent.putExtra(EXTRA_CURRENT_MEDIA, current)
|
||||
@ -260,6 +259,10 @@ object IntentUtils {
|
||||
intent.putExtra(EXTRA_STATUS, status)
|
||||
intent.data = getMediaViewerUri("status", status.id, accountKey)
|
||||
}
|
||||
if (message != null) {
|
||||
intent.putExtra(EXTRA_MESSAGE, message)
|
||||
intent.data = getMediaViewerUri("message", message.id, accountKey)
|
||||
}
|
||||
if (newDocument && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT)
|
||||
}
|
||||
@ -267,7 +270,7 @@ object IntentUtils {
|
||||
}
|
||||
|
||||
fun getMediaViewerUri(type: String, id: String,
|
||||
accountKey: UserKey?): Uri {
|
||||
accountKey: UserKey?): Uri {
|
||||
val builder = Uri.Builder()
|
||||
builder.scheme(SCHEME_TWIDERE)
|
||||
builder.authority("media")
|
||||
@ -291,7 +294,7 @@ object IntentUtils {
|
||||
}
|
||||
|
||||
fun openIncomingFriendships(context: Context,
|
||||
accountKey: UserKey?) {
|
||||
accountKey: UserKey?) {
|
||||
val builder = Uri.Builder()
|
||||
builder.scheme(SCHEME_TWIDERE)
|
||||
builder.authority(AUTHORITY_INCOMING_FRIENDSHIPS)
|
||||
@ -316,7 +319,7 @@ object IntentUtils {
|
||||
}
|
||||
|
||||
fun openMutesUsers(context: Context,
|
||||
accountKey: UserKey?) {
|
||||
accountKey: UserKey?) {
|
||||
val builder = Uri.Builder()
|
||||
builder.scheme(SCHEME_TWIDERE)
|
||||
builder.authority(AUTHORITY_MUTES_USERS)
|
||||
@ -329,7 +332,7 @@ object IntentUtils {
|
||||
}
|
||||
|
||||
fun openScheduledStatuses(context: Context,
|
||||
accountKey: UserKey?) {
|
||||
accountKey: UserKey?) {
|
||||
val builder = Uri.Builder()
|
||||
builder.scheme(SCHEME_TWIDERE)
|
||||
builder.authority(AUTHORITY_SCHEDULED_STATUSES)
|
||||
@ -401,7 +404,7 @@ object IntentUtils {
|
||||
}
|
||||
|
||||
fun openStatusFavoriters(context: Context, accountKey: UserKey?,
|
||||
statusId: String) {
|
||||
statusId: String) {
|
||||
val builder = Uri.Builder()
|
||||
builder.scheme(SCHEME_TWIDERE)
|
||||
builder.authority(AUTHORITY_STATUS_FAVORITERS)
|
||||
@ -414,7 +417,7 @@ object IntentUtils {
|
||||
}
|
||||
|
||||
fun openStatusRetweeters(context: Context, accountKey: UserKey?,
|
||||
statusId: String) {
|
||||
statusId: String) {
|
||||
val builder = Uri.Builder()
|
||||
builder.scheme(SCHEME_TWIDERE)
|
||||
builder.authority(AUTHORITY_STATUS_RETWEETERS)
|
||||
@ -427,7 +430,7 @@ object IntentUtils {
|
||||
}
|
||||
|
||||
fun openTweetSearch(context: Context, accountKey: UserKey?,
|
||||
query: String) {
|
||||
query: String) {
|
||||
openSearch(context, accountKey, query, QUERY_PARAM_VALUE_TWEETS)
|
||||
}
|
||||
|
||||
@ -442,9 +445,9 @@ object IntentUtils {
|
||||
}
|
||||
|
||||
fun openUserFavorites(context: Context,
|
||||
accountKey: UserKey?,
|
||||
userKey: UserKey?,
|
||||
screenName: String?) {
|
||||
accountKey: UserKey?,
|
||||
userKey: UserKey?,
|
||||
screenName: String?) {
|
||||
val builder = Uri.Builder()
|
||||
builder.scheme(SCHEME_TWIDERE)
|
||||
builder.authority(AUTHORITY_USER_FAVORITES)
|
||||
@ -463,9 +466,9 @@ object IntentUtils {
|
||||
}
|
||||
|
||||
fun openUserFollowers(context: Context,
|
||||
accountKey: UserKey?,
|
||||
userKey: UserKey?,
|
||||
screenName: String?) {
|
||||
accountKey: UserKey?,
|
||||
userKey: UserKey?,
|
||||
screenName: String?) {
|
||||
val builder = Uri.Builder()
|
||||
builder.scheme(SCHEME_TWIDERE)
|
||||
builder.authority(AUTHORITY_USER_FOLLOWERS)
|
||||
@ -483,9 +486,9 @@ object IntentUtils {
|
||||
}
|
||||
|
||||
fun openUserFriends(context: Context,
|
||||
accountKey: UserKey?,
|
||||
userKey: UserKey?,
|
||||
screenName: String?) {
|
||||
accountKey: UserKey?,
|
||||
userKey: UserKey?,
|
||||
screenName: String?) {
|
||||
val builder = Uri.Builder()
|
||||
builder.scheme(SCHEME_TWIDERE)
|
||||
builder.authority(AUTHORITY_USER_FRIENDS)
|
||||
@ -504,10 +507,10 @@ object IntentUtils {
|
||||
}
|
||||
|
||||
fun openUserListDetails(context: Context,
|
||||
accountKey: UserKey?,
|
||||
listId: String?,
|
||||
userId: UserKey?,
|
||||
screenName: String?, listName: String?) {
|
||||
accountKey: UserKey?,
|
||||
listId: String?,
|
||||
userId: UserKey?,
|
||||
screenName: String?, listName: String?) {
|
||||
val builder = Uri.Builder()
|
||||
builder.scheme(SCHEME_TWIDERE)
|
||||
builder.authority(AUTHORITY_USER_LIST)
|
||||
@ -531,7 +534,7 @@ object IntentUtils {
|
||||
}
|
||||
|
||||
fun openUserListDetails(context: Context,
|
||||
userList: ParcelableUserList) {
|
||||
userList: ParcelableUserList) {
|
||||
val userKey = userList.user_key
|
||||
val listId = userList.id
|
||||
val extras = Bundle()
|
||||
@ -564,9 +567,9 @@ object IntentUtils {
|
||||
}
|
||||
|
||||
fun openUserLists(context: Context,
|
||||
accountKey: UserKey?,
|
||||
userKey: UserKey?,
|
||||
screenName: String?) {
|
||||
accountKey: UserKey?,
|
||||
userKey: UserKey?,
|
||||
screenName: String?) {
|
||||
val builder = Uri.Builder()
|
||||
builder.scheme(SCHEME_TWIDERE)
|
||||
builder.authority(AUTHORITY_USER_LISTS)
|
||||
@ -585,9 +588,9 @@ object IntentUtils {
|
||||
|
||||
|
||||
fun openUserGroups(context: Context,
|
||||
accountKey: UserKey?,
|
||||
userId: UserKey?,
|
||||
screenName: String?) {
|
||||
accountKey: UserKey?,
|
||||
userId: UserKey?,
|
||||
screenName: String?) {
|
||||
val builder = Uri.Builder()
|
||||
builder.scheme(SCHEME_TWIDERE)
|
||||
builder.authority(AUTHORITY_USER_GROUPS)
|
||||
|
@ -103,7 +103,8 @@ class MessageViewHolder(itemView: View, adapter: MessagesConversationAdapter) :
|
||||
} else {
|
||||
mediaPreview.visibility = View.VISIBLE
|
||||
mediaPreview.displayMedia(adapter.mediaLoader, message.media, message.account_key,
|
||||
withCredentials = true, loadingHandler = adapter.mediaLoadingHandler)
|
||||
withCredentials = true, loadingHandler = adapter.mediaLoadingHandler,
|
||||
mediaClickListener = adapter.mediaClickListener, extraId = layoutPosition.toLong())
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user