feat(icons): swap post + incognito_off drawables for Material Symbols
- BookmarkGroupItem: replace R.drawable.post with MaterialSymbols.News (codepoint U+E032). Drop now-unused post.xml. - IncognitoBadge: drop the NIP-17 "encrypted" indicator (encryption is the expected default; no need to flag) and replace the legacy NIP-04 unencrypted indicator with MaterialSymbols.NoEncryption (U+F03F). Drop now-unused incognito_off.xml. incognito.xml is kept — still used by the "post anonymously" toggle in ToggleNip17Button, GenericCommentPostScreen, and ShortNotePostScreen. https://claude.ai/code/session_016gV9gEaSud6kDMdcaqy8ti
This commit is contained in:
+2
-3
@@ -43,7 +43,6 @@ import androidx.compose.runtime.remember
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.text.font.FontStyle
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
@@ -172,7 +171,7 @@ private fun BookmarkGroupActions(
|
||||
onClick = openPostBookmarks,
|
||||
) {
|
||||
Icon(
|
||||
painter = painterResource(R.drawable.post),
|
||||
symbol = MaterialSymbols.News,
|
||||
contentDescription = null,
|
||||
)
|
||||
Text(stringRes(R.string.bookmark_list_posts_btn_label))
|
||||
@@ -212,7 +211,7 @@ fun BookmarkMembershipStatusAndNumberDisplay(
|
||||
horizontalArrangement = SpacedBy2dp,
|
||||
) {
|
||||
Icon(
|
||||
painter = painterResource(R.drawable.post),
|
||||
symbol = MaterialSymbols.News,
|
||||
modifier = Size10Modifier,
|
||||
contentDescription = null,
|
||||
)
|
||||
|
||||
+5
-15
@@ -21,32 +21,22 @@
|
||||
package com.vitorpamplona.amethyst.ui.screen.loggedIn.chats.privateDM
|
||||
|
||||
import androidx.compose.foundation.layout.Spacer
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.runtime.Composable
|
||||
import com.vitorpamplona.amethyst.R
|
||||
import com.vitorpamplona.amethyst.commons.icons.symbols.Icon
|
||||
import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbols
|
||||
import com.vitorpamplona.amethyst.model.Note
|
||||
import com.vitorpamplona.amethyst.ui.painterRes
|
||||
import com.vitorpamplona.amethyst.ui.theme.IncognitoIconModifier
|
||||
import com.vitorpamplona.amethyst.ui.theme.StdHorzSpacer
|
||||
import com.vitorpamplona.amethyst.ui.theme.placeholderText
|
||||
import com.vitorpamplona.quartz.nip04Dm.messages.PrivateDmEvent
|
||||
import com.vitorpamplona.quartz.nip17Dm.base.NIP17Group
|
||||
|
||||
@Composable
|
||||
fun IncognitoBadge(baseNote: Note) {
|
||||
if (baseNote.event is NIP17Group) {
|
||||
if (baseNote.event is PrivateDmEvent) {
|
||||
Icon(
|
||||
painter = painterRes(resourceId = R.drawable.incognito, 1),
|
||||
null,
|
||||
modifier = IncognitoIconModifier,
|
||||
tint = MaterialTheme.colorScheme.placeholderText,
|
||||
)
|
||||
Spacer(modifier = StdHorzSpacer)
|
||||
} else if (baseNote.event is PrivateDmEvent) {
|
||||
Icon(
|
||||
painter = painterRes(resourceId = R.drawable.incognito_off, 1),
|
||||
null,
|
||||
symbol = MaterialSymbols.NoEncryption,
|
||||
contentDescription = null,
|
||||
modifier = IncognitoIconModifier,
|
||||
tint = MaterialTheme.colorScheme.placeholderText,
|
||||
)
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="m22.11,21.46 l-19.72,-19.73 -1.28,1.27 5.2,5.2 -0.31,0.8h1.11l1.5,1.5h-6.61v1.5h8.11l3.39,3.37c-0.12,0.24 -0.2,0.48 -0.26,0.73 -0.95,-0.41 -1.83,-0.3 -2.48,-0.01 -0.41,-1.78 -1.97,-3.09 -3.82,-3.09 -2.17,0 -3.94,1.79 -3.94,4s1.77,4 3.94,4c2.06,0 3.74,-1.62 3.9,-3.68 0.34,-0.24 1.23,-0.69 2.32,0.02 0.18,2.05 1.84,3.66 3.9,3.66 0.6,0 1.16,-0.14 1.66,-0.39l2.12,2.12zM6.94,19.86c-1.56,0 -2.81,-1.28 -2.81,-2.86s1.26,-2.86 2.81,-2.86c1.56,0 2.81,1.28 2.81,2.86s-1.25,2.86 -2.81,2.86m10.12,0c-1.56,0 -2.81,-1.28 -2.81,-2.86 0,-0.26 0.04,-0.5 0.11,-0.75l3.48,3.48c-0.25,0.08 -0.5,0.13 -0.78,0.13m4.94,-7.86h-6.8l-1.5,-1.5h8.3zM17.06,13c2.17,0 3.94,1.79 3.94,4 0,0.25 -0.03,0.5 -0.07,0.73l-1.09,-1.09c-0.16,-1.3 -1.18,-2.32 -2.46,-2.47l-1.09,-1.08c0.25,-0.06 0.51,-0.09 0.77,-0.09m-4.86,-4 l-4.48,-4.5 0.71,-1.82c0.2,-0.51 0.76,-0.79 1.29,-0.64l0.05,0.01 2.23,0.74 2.22,-0.74c0.53,-0.17 1.1,0.09 1.32,0.58l0.02,0.05 2.44,6.32z"/>
|
||||
</vector>
|
||||
@@ -1 +0,0 @@
|
||||
<!-- drawable/post.xml --><vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:width="24dp" android:viewportWidth="24" android:viewportHeight="24"><path android:fillColor="#000000" android:pathData="M3 3V21H21V3H3M18 18H6V17H18V18M18 16H6V15H18V16M18 12H6V6H18V12Z" /></vector>
|
||||
+2
@@ -142,6 +142,8 @@ object MaterialSymbols {
|
||||
val MoreVert = MaterialSymbol("\uE5D4")
|
||||
val MoveToInbox = MaterialSymbol("\uE168")
|
||||
val MusicNote = MaterialSymbol("\uE405")
|
||||
val News = MaterialSymbol("\uE032")
|
||||
val NoEncryption = MaterialSymbol("\uF03F")
|
||||
val Notifications = MaterialSymbol("\uE7F5")
|
||||
val Numbers = MaterialSymbol("\uEAC7")
|
||||
val OpenInBrowser = MaterialSymbol("\uE89D")
|
||||
|
||||
Reference in New Issue
Block a user