fixed mute notifications
This commit is contained in:
parent
a01cef7a3b
commit
401a7cdfbc
|
@ -43,6 +43,6 @@ public abstract class ConversationExtras implements Parcelable {
|
|||
return LoganSquare.parse(json, TwitterOfficialConversationExtras.class);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
return LoganSquare.parse(json, DefaultConversationExtras.class);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,11 +23,14 @@ import android.accounts.AccountManager
|
|||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.graphics.PorterDuff
|
||||
import android.net.Uri
|
||||
import android.os.Bundle
|
||||
import android.support.v4.app.FragmentActivity
|
||||
import android.support.v4.app.LoaderManager
|
||||
import android.support.v4.content.ContextCompat
|
||||
import android.support.v4.content.Loader
|
||||
import android.support.v4.widget.TextViewCompat
|
||||
import android.support.v7.app.AppCompatActivity
|
||||
import android.support.v7.widget.FixedLinearLayoutManager
|
||||
import android.support.v7.widget.LinearLayoutManager
|
||||
|
@ -461,6 +464,19 @@ class MessagesConversationFragment : AbsContentListRecyclerViewFragment<Messages
|
|||
} else {
|
||||
conversationSubtitle.visibility = View.GONE
|
||||
}
|
||||
|
||||
|
||||
val stateIcon = if (conversation.notificationDisabled) {
|
||||
ContextCompat.getDrawable(context, R.drawable.ic_message_type_speaker_muted).apply {
|
||||
mutate()
|
||||
setColorFilter(conversationTitle.currentTextColor, PorterDuff.Mode.SRC_ATOP)
|
||||
}
|
||||
} else {
|
||||
null
|
||||
}
|
||||
TextViewCompat.setCompoundDrawablesRelativeWithIntrinsicBounds(conversationTitle, null,
|
||||
null, stateIcon, null)
|
||||
|
||||
conversation.displayAvatarTo(mediaLoader, conversationAvatar)
|
||||
}
|
||||
|
||||
|
|
|
@ -43,8 +43,6 @@
|
|||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="@dimen/element_spacing_normal"
|
||||
android:layout_marginStart="@dimen/element_spacing_normal"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
|
@ -57,6 +55,8 @@
|
|||
android:maxLines="1"
|
||||
android:textAppearance="?android:textAppearanceMedium"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
tools:drawableEnd="@drawable/ic_message_type_speaker_muted"
|
||||
tools:drawableTint="?android:textColorSecondary"
|
||||
tools:text="Conversation name"/>
|
||||
|
||||
<org.mariotaku.twidere.view.FixedTextView
|
||||
|
|
Loading…
Reference in New Issue