mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-11 01:54:40 +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);
|
||||
};
|
||||
|
||||
const disabledPackages = AppEnv.config.get('core.disabledPackages') || [];
|
||||
if (disabledPackages.includes('thread-snooze')) {
|
||||
return props;
|
||||
}
|
||||
// Technically this should be exposed as an API so thread-snooze can register for this
|
||||
// behavior, but for now we just check for it explicitly.
|
||||
const snoozePresent = AppEnv.packages.isPackageActive('thread-snooze');
|
||||
|
||||
if (FocusedPerspectiveStore.current().isInbox()) {
|
||||
if (snoozePresent && FocusedPerspectiveStore.current().isInbox()) {
|
||||
props.onSwipeLeftClass = 'swipe-snooze';
|
||||
props.onSwipeCenter = () => {
|
||||
Actions.closePopover();
|
||||
|
|
Loading…
Reference in a new issue