@@ -323,27 +323,28 @@ func (m *EmailView) View() tea.View {
323323 os .Stdout .WriteString ("\x1b _Ga=d,d=a\x1b \\ " )
324324 os .Stdout .Sync ()
325325
326- cryptoStatus := ""
326+ var cryptoStatus strings.Builder
327+
327328 if m .isEncrypted {
328- cryptoStatus = lipgloss .NewStyle ().Foreground (theme .ActiveTheme .Accent ).Render (" [S/MIME: 🔒 Encrypted]" )
329+ cryptoStatus . WriteString ( lipgloss .NewStyle ().Foreground (theme .ActiveTheme .Accent ).Render (" [S/MIME: 🔒 Encrypted]" ) )
329330 } else if m .isSMIME {
330331 if m .smimeTrusted {
331- cryptoStatus = lipgloss .NewStyle ().Foreground (theme .ActiveTheme .Accent ).Render (" [S/MIME: ✅ Trusted]" )
332+ cryptoStatus . WriteString ( lipgloss .NewStyle ().Foreground (theme .ActiveTheme .Accent ).Render (" [S/MIME: ✅ Trusted]" ) )
332333 } else {
333- cryptoStatus = lipgloss .NewStyle ().Foreground (theme .ActiveTheme .Danger ).Render (" [S/MIME: ❌ Untrusted]" )
334+ cryptoStatus . WriteString ( lipgloss .NewStyle ().Foreground (theme .ActiveTheme .Danger ).Render (" [S/MIME: ❌ Untrusted]" ) )
334335 }
335336 }
336337 if m .isPGPEncrypted {
337- cryptoStatus += lipgloss .NewStyle ().Foreground (theme .ActiveTheme .Accent ).Render (" [PGP: 🔒 Encrypted]" )
338+ cryptoStatus . WriteString ( lipgloss .NewStyle ().Foreground (theme .ActiveTheme .Accent ).Render (" [PGP: 🔒 Encrypted]" ) )
338339 } else if m .isPGP {
339340 if m .pgpTrusted {
340- cryptoStatus += lipgloss .NewStyle ().Foreground (theme .ActiveTheme .Accent ).Render (" [PGP: ✅ Verified]" )
341+ cryptoStatus . WriteString ( lipgloss .NewStyle ().Foreground (theme .ActiveTheme .Accent ).Render (" [PGP: ✅ Verified]" ) )
341342 } else {
342- cryptoStatus += lipgloss .NewStyle ().Foreground (theme .ActiveTheme .Danger ).Render (" [PGP: ⚠️ Unverified]" )
343+ cryptoStatus . WriteString ( lipgloss .NewStyle ().Foreground (theme .ActiveTheme .Danger ).Render (" [PGP: ⚠️ Unverified]" ) )
343344 }
344345 }
345346
346- header := fmt .Sprintf ("To: %s | From: %s | Subject: %s%s" , strings .Join (m .email .To , ", " ), m .email .From , m .email .Subject , cryptoStatus )
347+ header := fmt .Sprintf ("To: %s | From: %s | Subject: %s%s" , strings .Join (m .email .To , ", " ), m .email .From , m .email .Subject , cryptoStatus . String () )
347348 styledHeader := emailHeaderStyle .Width (m .viewport .Width ()).Render (header )
348349
349350 var help string
@@ -354,17 +355,22 @@ func (m *EmailView) View() tea.View {
354355 }
355356 help = helpStyle .Render (helpText )
356357 } else {
357- shortcuts := "\uf112 r: reply • \uf064 f: forward • \uea81 d: delete • \uea98 a: archive • \uf435 tab: focus attachments • \ueb06 esc: back to inbox"
358+ var shortcuts strings.Builder
359+ shortcuts .WriteString ("\uf112 r: reply • \uf064 f: forward • \uea81 d: delete • \uea98 a: archive • \uf435 tab: focus attachments • \ueb06 esc: back to inbox" )
358360 if view .ImageProtocolSupported () {
359- shortcuts = shortcuts + "• \uf03e i: toggle images"
361+ shortcuts . WriteString ( "• \uf03e i: toggle images" )
360362 }
361363 for _ , pk := range m .pluginKeyBindings {
362- shortcuts += " • " + pk .Key + ": " + pk .Description
364+ shortcuts .WriteString (" • " )
365+ shortcuts .WriteString (pk .Key )
366+ shortcuts .WriteString (": " )
367+ shortcuts .WriteString (pk .Description )
363368 }
364369 if m .pluginStatus != "" {
365- shortcuts += " • " + m .pluginStatus
370+ shortcuts .WriteString (" • " )
371+ shortcuts .WriteString (m .pluginStatus )
366372 }
367- help = helpStyle .Render (shortcuts )
373+ help = helpStyle .Render (shortcuts . String () )
368374 }
369375
370376 var attachmentView string
0 commit comments