Expand/Collapse Sidebar V0
Summary: - Show all or show 5 LRU plugins - Update when close/reopen app, collapse sidebar, or expand sidebar Reviewed By: danielbuechele Differential Revision: D16917950 fbshipit-source-id: 1e7edc86945162ea14e1cdaa89aa47d3defa4c7d
This commit is contained in:
committed by
Facebook Github Bot
parent
007a29805a
commit
ea7578aa16
@@ -13,7 +13,6 @@ import {FlipperBasePlugin} from '../plugin';
|
||||
import {PluginNotification} from '../reducers/notifications';
|
||||
import {ActiveSheet} from '../reducers/application';
|
||||
import {State as Store} from '../reducers';
|
||||
import {isTopUsedPlugin} from '../fb-stubs/pluginUsage';
|
||||
|
||||
import {
|
||||
Sidebar,
|
||||
@@ -318,13 +317,12 @@ class MainSidebar extends PureComponent<Props> {
|
||||
{Array.from(this.props.clientPlugins.values())
|
||||
.filter(
|
||||
(p: typeof FlipperDevicePlugin) =>
|
||||
client.plugins.indexOf(p.id) > -1,
|
||||
(client.showAllPlugins
|
||||
? client.plugins
|
||||
: client.lessPlugins
|
||||
).indexOf(p.id) > -1,
|
||||
)
|
||||
.filter(
|
||||
(p: typeof FlipperDevicePlugin) =>
|
||||
client.showAllPlugins || isTopUsedPlugin(p.title, 5),
|
||||
)
|
||||
.sort(byPluginNameOrId)
|
||||
.sort((a, b) => client.byClientLRU(a, b))
|
||||
.map((plugin: typeof FlipperDevicePlugin) => (
|
||||
<PluginSidebarListItem
|
||||
key={plugin.id}
|
||||
|
||||
Reference in New Issue
Block a user