pad: Simplify reload after .etherpad import

The old "switch to pad" logic looked buggy, and it complicates pad
initialization. Forcing a refresh after importing an `.etherpad` file
isn't much of a UX downgrade.
This commit is contained in:
Richard Hansen 2021-10-28 15:55:47 -04:00
parent e974622561
commit 5cbbcbcee6
6 changed files with 10 additions and 83 deletions

View file

@ -235,8 +235,8 @@ const doImport = async (req, res, padId) => {
pad = await padManager.getPad(padId);
padManager.unloadPad(padId);
// direct Database Access means a pad user should perform a switchToPad
// and not attempt to receive updated pad data
// Direct database access means a pad user should reload the pad and not attempt to receive
// updated pad data.
if (directDatabaseAccess) return true;
// tell clients to update