fx140: Fix more broken code

This commit is contained in:
Abe Jellinek 2025-06-30 19:06:07 -04:00 • committed by Dan Stillman
parent a080b7c9c6
commit eeb94aea48
7 changed files with 12 additions and 10 deletions

View file

@ -26,8 +26,7 @@
const { BlockingObserver } = ChromeUtils.importESModule("chrome://zotero/content/BlockingObserver.mjs");
// TODO: Fx140: Migrate actors and re-enable
// ChromeUtils.importESModule("chrome://zotero/content/actors/ActorManager.mjs");
ChromeUtils.importESModule("chrome://zotero/content/actors/ActorManager.mjs");
/* global HiddenFrame, E10SUtils */
ChromeUtils.defineESModuleGetters(globalThis, {

View file

@ -1,6 +1,8 @@
// Register Mozilla actors
import "resource://gre/modules/ActorManagerParent.sys.mjs";
// TODO: Fx140: Migrate actors and re-enable
if(false) {
ChromeUtils.registerWindowActor("PageData", {
child: {
moduleURI: "chrome://zotero/content/actors/PageDataChild.jsm"
@ -90,3 +92,4 @@ ChromeUtils.registerWindowActor("DocumentIsReady", {
moduleURI: "chrome://zotero/content/actors/DocumentIsReadyChild.jsm"
}
});
}

View file

@ -26,7 +26,7 @@
"use strict";
{
ChromeUtils.import("chrome://zotero/content/actors/ActorManager.jsm");
ChromeUtils.importESModule("chrome://zotero/content/actors/ActorManager.mjs");
const SANDBOX_ALL_FLAGS = 0xFFFFF;

View file

@ -86,7 +86,7 @@ const ZoteroStandalone = new function () {
if(!Zotero) {
throw true;
}
if(Zotero.initializationPromise.isPending()) {
if(!Zotero.initialized) {
Zotero.showZoteroPaneProgressMeter();
}
return Zotero.initializationPromise;

View file

@ -32,11 +32,12 @@ Zotero.Feeds = new function () {
this.init = function () {
// Delay initialization for tests
_initPromise = Zotero.Schema.schemaUpdatePromise.delay(5000)
.then(() => {
_initPromise = Zotero.Schema.schemaUpdatePromise
.then(async () => {
// Don't run feed checks randomly during tests
if (Zotero.test) return;
await Zotero.Promise.delay(5000);
return this.scheduleNextFeedCheck();
})
.then(() => _initPromise = null);

View file

@ -730,14 +730,13 @@ const { CommandLineOptions } = ChromeUtils.importESModule("chrome://zotero/conte
// Load all library data except for items, which are loaded when libraries are first
// clicked on or if otherwise necessary
await // FIXME: fx140: replace call to Zotero.Promise.each()
Zotero.Promise.each(Zotero.Libraries.getAll(), library => (async function () {
await Array.fromAsync(Zotero.Libraries.getAll(), async (library) => {
await Zotero.SyncedSettings.loadAll(library.libraryID);
if (library.libraryType != 'feed') {
await Zotero.Collections.loadAll(library.libraryID);
await Zotero.Searches.loadAll(library.libraryID);
}
})());
});
// Migrate fields from Extra that can be moved to item fields after a schema update
await Zotero.Schema.migrateExtraFields();

View file

@ -23,6 +23,7 @@
***** END LICENSE BLOCK *****
*/
const { ZOTERO_CONFIG } = ChromeUtils.importESModule('resource://zotero/config.mjs');
var { FilePicker } = ChromeUtils.importESModule('chrome://zotero/content/modules/filePicker.mjs');
/*
@ -135,7 +136,6 @@ var ZoteroPane = new function () {
}
// Set the sync tooltip label
Cu.import("resource://zotero/config.js");
let syncLabel = document.getElementById('zotero-tb-sync-label');
syncLabel.value = Zotero.getString('sync.syncWith', ZOTERO_CONFIG.DOMAIN_NAME);
let syncButton = document.querySelector("#zotero-tb-sync");