Skip to content

Commit bec582f

Browse files
committed
Add obfuscated text support.
1 parent ca1239b commit bec582f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/minecraft/chatToJsx.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ const parseChatToJsx = (
188188
const style: StyleProp<TextStyle> = {}
189189
if (c.bold) style.fontWeight = 'bold'
190190
if (c.italic) style.fontStyle = 'italic'
191-
// TODO: if (c.obfuscated) style.color = 'transparent'
191+
if (c.obfuscated) c.text = (c.text || '').replace(/./g, '▒')
192192
if (c.underlined && c.strikethrough) {
193193
style.textDecorationLine = 'underline line-through'
194194
} else if (c.underlined) style.textDecorationLine = 'underline'

src/screens/ServerScreen.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ const ServerScreen = () => {
174174
const onCloseOrError = () => {
175175
setConnection(undefined)
176176
if (newConn.disconnectReason) {
177-
// LOW-TODO: This doesn't always hit correctly, since screen may be unrendered.
177+
// TODO: This doesn't always hit correctly, since screen may be unrendered.
178178
setDisconnectDialog({
179179
server,
180180
reason: JSON.parse(newConn.disconnectReason)

0 commit comments

Comments
 (0)