forked from upstream-mirrors/quik
Fix icon and tint for conversation info
This commit is contained in:
@@ -21,6 +21,7 @@ package presentation.common.base
|
||||
import android.annotation.SuppressLint
|
||||
import android.arch.lifecycle.Lifecycle
|
||||
import android.os.Bundle
|
||||
import com.moez.QKSMS.R
|
||||
import com.uber.autodispose.android.lifecycle.scope
|
||||
import com.uber.autodispose.kotlin.autoDisposable
|
||||
import common.util.Colors
|
||||
@@ -58,12 +59,16 @@ abstract class QkThemedActivity<VM : QkViewModel<*, *>> : QkActivity<VM>() {
|
||||
super.onPostCreate(savedInstanceState)
|
||||
|
||||
// Update the colours of the menu items
|
||||
Observables.combineLatest(menu, colors.theme, { menu, color ->
|
||||
Observables.combineLatest(menu, colors.theme, colors.textTertiary, { menu, theme, textTertiary ->
|
||||
(0 until menu.size())
|
||||
.map { position -> menu.getItem(position) }
|
||||
.forEach { menuItem ->
|
||||
menuItem?.icon?.run {
|
||||
setTint(color)
|
||||
setTint(when(menuItem.itemId) {
|
||||
R.id.info -> textTertiary
|
||||
else -> theme
|
||||
})
|
||||
|
||||
menuItem.icon = this
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -23,5 +23,5 @@
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M11,17h2v-6h-2v6zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8zM11,9h2L13,7h-2v2z"/>
|
||||
android:pathData="M12,8c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM12,10c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM12,16c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2z"/>
|
||||
</vector>
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
<item
|
||||
android:id="@+id/info"
|
||||
android:icon="@drawable/ic_info_outline_black_24dp"
|
||||
android:icon="@drawable/ic_more_vert_black_24dp"
|
||||
android:title="@string/menu_info"
|
||||
android:visible="false"
|
||||
app:showAsAction="always" />
|
||||
|
||||
Reference in New Issue
Block a user