async getAllItems(shouldFetchLocally) {
		var t = Date.now();
		var d = deferred();

		const items = [];

		if (window.user && !shouldFetchLocally) {
			var remoteDb = window.db.getDb();

			const q = query(
				collection(remoteDb, 'items'),
				where('createdBy', '==', window.user.uid)
			);
			getDocs(q)
				.then(querySnapshot => {
					querySnapshot.forEach(doc => {
						items.push(doc.data());
					});
					log(`${items.length} items fetched in `, Date.now() - t, 'ms');
					d.resolve(items);
				})
				.catch(() => {
					d.resolve([]);
				});
		} else {
			let itemIds = await this.getUserItemIds(shouldFetchLocally);
			itemIds = Object.getOwnPropertyNames(itemIds || {});

			if (!itemIds.length) {
				d.resolve([]);
			}

			for (let i = 0; i < itemIds.length; i++) {
				/* eslint-disable no-loop-func */
				window.db.local.get(itemIds[i], itemResult => {
					items.push(itemResult[itemIds[i]]);
					// Check if we have all items now.
					if (itemIds.length === items.length) {
						d.resolve(items);
					}
				});

				/* eslint-enable no-loop-func */
			}
		}
		return d.promise;
	}
Fetches all items.
@param {boolean} shouldFetchLocally Should forcefully fetch locally?