Skip to content

Commit

Permalink
Merge pull request #4244 from crazyserver/MOBILE-4138
Browse files Browse the repository at this point in the history
MOBILE-4138 core: Unprotect updateHandlers on delegates
  • Loading branch information
dpalou authored Nov 20, 2024
2 parents bd96f1a + a6cfe91 commit f39d4a9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/core/classes/delegate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ export class CoreDelegate<HandlerType extends CoreDelegateHandler> {
*
* @returns Resolved when done.
*/
protected async updateHandlers(): Promise<void> {
async updateHandlers(): Promise<void> {
this.handlersLoaded = false;

const enabled = await this.isEnabled();
Expand Down
4 changes: 1 addition & 3 deletions src/core/services/tests/plugin-file-delegate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import { mock, mockSingleton } from '@/testing/utils';
import { CoreSite } from '@classes/sites/site';
import { CorePluginFileDelegateService, CorePluginFileHandler } from '@services/plugin-file-delegate';
import { CoreSites } from '@services/sites';
import { CoreEvents } from '@singletons/events';
import { CoreUrl } from '@singletons/url';

describe('CorePluginFileDelegate', () => {
Expand All @@ -33,8 +32,7 @@ describe('CorePluginFileDelegate', () => {
pluginFileDelegate = new CorePluginFileDelegateService();
pluginFileDelegate.registerHandler(new ModFooRevisionHandler());

CoreEvents.trigger(CoreEvents.LOGIN, { siteId: '42' }, '42');
await pluginFileDelegate.waitForReady();
await pluginFileDelegate.updateHandlers();
});

it('removes revision from a URL', () => {
Expand Down

0 comments on commit f39d4a9

Please sign in to comment.