mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-09-23 00:36:50 +08:00
24 lines
686 B
Plaintext
24 lines
686 B
Plaintext
|
import {PLUGIN_ID} from './send-reminders-constants'
|
||
|
import {getLatestMessageWithReminder} from './send-reminders-utils'
|
||
|
|
||
|
export const name = 'SendRemindersThreadListExtension'
|
||
|
|
||
|
export function cssClassNamesForThreadListItem(thread) {
|
||
|
const {shouldNotify} = thread.metadataForPluginId(PLUGIN_ID) || {}
|
||
|
if (shouldNotify) {
|
||
|
return 'thread-list-reminder-item'
|
||
|
}
|
||
|
return ''
|
||
|
}
|
||
|
|
||
|
export function cssClassNamesForThreadListIcon(thread) {
|
||
|
const {shouldNotify} = thread.metadataForPluginId(PLUGIN_ID) || {}
|
||
|
if (shouldNotify) {
|
||
|
return 'thread-icon-reminder-triggered'
|
||
|
}
|
||
|
if (getLatestMessageWithReminder(thread)) {
|
||
|
return 'thread-icon-reminder-pending'
|
||
|
}
|
||
|
return ''
|
||
|
}
|