mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-25 00:25:03 +08:00
fix(thread-list): Show emoji in bolded subject lines
This commit is contained in:
parent
0d2a6a5264
commit
d8459bb2cd
2 changed files with 12 additions and 0 deletions
|
@ -26,6 +26,15 @@ TimestampComponentForPerspective = (thread) ->
|
|||
subject = (subj) ->
|
||||
if (subj ? "").trim().length is 0
|
||||
return <span className="no-subject">(No Subject)</span>
|
||||
else if subj.split(/([\uD800-\uDBFF][\uDC00-\uDFFF])/g).length > 1
|
||||
subjComponents = []
|
||||
subjParts = subj.split /([\uD800-\uDBFF][\uDC00-\uDFFF])/g
|
||||
for part in subjParts
|
||||
if part.match /([\uD800-\uDBFF][\uDC00-\uDFFF])/g
|
||||
subjComponents.push <span className="emoji">{part}</span>
|
||||
else
|
||||
subjComponents.push <span>{part}</span>
|
||||
return subjComponents
|
||||
else
|
||||
return subj
|
||||
|
||||
|
|
|
@ -227,6 +227,9 @@
|
|||
// is noticeable.
|
||||
.subject {
|
||||
font-weight: @font-weight-semi-bold;
|
||||
.emoji {
|
||||
font-weight: @font-weight-normal;
|
||||
}
|
||||
}
|
||||
.participants {
|
||||
.unread-true {
|
||||
|
|
Loading…
Reference in a new issue