Fix bug with plugin re-installation after uninstallation
Summary: Fixed a bug when plugin installation status wouldn't be saved between sessions when plugin uninstalled and then re-installed again. Before the fix, after Flipper restart, such plugin was uninstalled again because its package name was not removed from "uninstalledPlugins" state. This was because plugin id was used by mistake instead of name in few places. To try avoiding this issue in future I've also renamed "uninstalledPlugins" to "uninstalledPluginNames" to make it more clear than package name should be used there rather than ID. As this field is persisted, I also added migration which moves data to the renamed field. Reviewed By: passy Differential Revision: D28314447 fbshipit-source-id: fbe3edc258b78fe7fbb0d966f93aabcdf3b66d4b
This commit is contained in:
committed by
Facebook GitHub Bot
parent
22974130c8
commit
00851c6b5d
@@ -767,7 +767,7 @@ test('test determinePluginsToProcess for mutilple clients having plugins present
|
||||
selectedPlugins: ['TestPlugin'],
|
||||
marketplacePlugins: [],
|
||||
installedPlugins: new Map(),
|
||||
uninstalledPlugins: new Set(),
|
||||
uninstalledPluginNames: new Set(),
|
||||
initialised: true,
|
||||
};
|
||||
const op = determinePluginsToProcess(
|
||||
@@ -842,7 +842,7 @@ test('test determinePluginsToProcess for no selected plugin present in any clien
|
||||
selectedPlugins: ['RandomPlugin'],
|
||||
marketplacePlugins: [],
|
||||
installedPlugins: new Map(),
|
||||
uninstalledPlugins: new Set(),
|
||||
uninstalledPluginNames: new Set(),
|
||||
initialised: true,
|
||||
};
|
||||
const op = determinePluginsToProcess([client1, client2], device1, plugins);
|
||||
@@ -894,7 +894,7 @@ test('test determinePluginsToProcess for multiple clients on same device', async
|
||||
selectedPlugins: ['TestPlugin'],
|
||||
marketplacePlugins: [],
|
||||
installedPlugins: new Map(),
|
||||
uninstalledPlugins: new Set(),
|
||||
uninstalledPluginNames: new Set(),
|
||||
initialised: true,
|
||||
};
|
||||
const op = determinePluginsToProcess([client1, client2], device1, plugins);
|
||||
@@ -984,7 +984,7 @@ test('test determinePluginsToProcess for multiple clients on different device',
|
||||
selectedPlugins: ['TestPlugin'],
|
||||
marketplacePlugins: [],
|
||||
installedPlugins: new Map(),
|
||||
uninstalledPlugins: new Set(),
|
||||
uninstalledPluginNames: new Set(),
|
||||
initialised: true,
|
||||
};
|
||||
const op = determinePluginsToProcess(
|
||||
@@ -1070,7 +1070,7 @@ test('test determinePluginsToProcess to ignore archived clients', async () => {
|
||||
selectedPlugins: ['TestPlugin'],
|
||||
marketplacePlugins: [],
|
||||
installedPlugins: new Map(),
|
||||
uninstalledPlugins: new Set(),
|
||||
uninstalledPluginNames: new Set(),
|
||||
initialised: true,
|
||||
};
|
||||
const op = determinePluginsToProcess(
|
||||
|
||||
Reference in New Issue
Block a user