mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-10-06 03:14:39 +08:00
Link swipe-to-snooze in the thread list to the availability of the snooze plugin
This commit is contained in:
parent
21fe6eeb7a
commit
17acb08ca6
1 changed files with 4 additions and 5 deletions
|
@ -177,12 +177,11 @@ class ThreadList extends React.Component<{}, { style: string; syncing: boolean }
|
||||||
callback(true);
|
callback(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
const disabledPackages = AppEnv.config.get('core.disabledPackages') || [];
|
// Technically this should be exposed as an API so thread-snooze can register for this
|
||||||
if (disabledPackages.includes('thread-snooze')) {
|
// behavior, but for now we just check for it explicitly.
|
||||||
return props;
|
const snoozePresent = AppEnv.packages.isPackageActive('thread-snooze');
|
||||||
}
|
|
||||||
|
|
||||||
if (FocusedPerspectiveStore.current().isInbox()) {
|
if (snoozePresent && FocusedPerspectiveStore.current().isInbox()) {
|
||||||
props.onSwipeLeftClass = 'swipe-snooze';
|
props.onSwipeLeftClass = 'swipe-snooze';
|
||||||
props.onSwipeCenter = () => {
|
props.onSwipeCenter = () => {
|
||||||
Actions.closePopover();
|
Actions.closePopover();
|
||||||
|
|
Loading…
Add table
Reference in a new issue