Mailspring/app/internal_packages/send-reminders/lib/send-reminders-thread-list-extension.es6

23 lines
619 B
Text
Raw Normal View History

2017-09-27 02:33:08 +08:00
import { PLUGIN_ID } from './send-reminders-constants';
2017-09-27 02:33:08 +08:00
export const name = 'SendRemindersThreadListExtension';
export function cssClassNamesForThreadListItem(thread) {
2017-09-27 02:33:08 +08:00
const { shouldNotify } = thread.metadataForPluginId(PLUGIN_ID) || {};
if (shouldNotify) {
2017-09-27 02:33:08 +08:00
return 'thread-list-reminder-item';
}
2017-09-27 02:33:08 +08:00
return '';
}
export function cssClassNamesForThreadListIcon(thread) {
2017-09-27 02:33:08 +08:00
const { expiration, shouldNotify } = thread.metadataForPluginId(PLUGIN_ID) || {};
if (shouldNotify) {
2017-09-27 02:33:08 +08:00
return 'thread-icon-reminder-triggered';
}
if (expiration) {
2017-09-27 02:33:08 +08:00
return 'thread-icon-reminder-pending';
}
2017-09-27 02:33:08 +08:00
return '';
}