async initialize() {
		console.log("Initializing application");

		let currentListId, currentListIndex, lists;

		[currentListId, currentListIndex, lists] = await DatabaseInfoModule.retrieveInfo(database, "To-do information");
		console.log(`Current list: ${currentListId}. Next list: ${currentListIndex}. Lists: ${lists}`);

		if (!currentListId) return;

		[this.currentList, this.currentListIndex, this.lists] = [currentListId, currentListIndex, lists];

		// Render lists in navbar

		let retrievedLists = await DatabaseInfoModule.retrieveInfo(database, "Lists"); // Sort lists by order
		let orderedLists = this.lists.map((listId) => {
			let listIndex = findElementIndex(retrievedLists, {prop: "id", val: listId});
			return retrievedLists[listIndex];
		});

		orderedLists.forEach((list) => {
			let newList = normalizeList(list, false);
			newList.renderInNavbar();
		});

		// Render current list in list view
		this.switchToList(currentListId);

		StateRenderingModule.showStartPage(false);
	}
/**
	 * Initializes the functionality by retrieving all to-do information from the database and rendering it.
	 */
Initializes the functionality by retrieving all to-do information from the database and rendering it.
Initializes the functionality by retrieving all to - do information from the database and rendering it .
async initialize() {
		console.log("Initializing application");
		let currentListId, currentListIndex, lists;
		[currentListId, currentListIndex, lists] = await DatabaseInfoModule.retrieveInfo(database, "To-do information");
		console.log(`Current list: ${currentListId}. Next list: ${currentListIndex}. Lists: ${lists}`);
		if (!currentListId) return;
		[this.currentList, this.currentListIndex, this.lists] = [currentListId, currentListIndex, lists];
		let retrievedLists = await DatabaseInfoModule.retrieveInfo(database, "Lists"); 
		let orderedLists = this.lists.map((listId) => {
			let listIndex = findElementIndex(retrievedLists, {prop: "id", val: listId});
			return retrievedLists[listIndex];
		});
		orderedLists.forEach((list) => {
			let newList = normalizeList(list, false);
			newList.renderInNavbar();
		});
		this.switchToList(currentListId);
		StateRenderingModule.showStartPage(false);
	}
async initialize ( ) { console . log ( "Initializing application" ) ; let currentListId , currentListIndex , lists ; [ currentListId , currentListIndex , lists ] = await DatabaseInfoModule . retrieveInfo ( database , "To-do information" ) ; console . log ( ` ${ currentListId } ${ currentListIndex } ${ lists } ` ) ; if ( ! currentListId ) return ; [ this . currentList , this . currentListIndex , this . lists ] = [ currentListId , currentListIndex , lists ] ; let retrievedLists = await DatabaseInfoModule . retrieveInfo ( database , "Lists" ) ; let orderedLists = this . lists . map ( ( listId ) => { let listIndex = findElementIndex ( retrievedLists , { prop : "id" , val : listId } ) ; return retrievedLists [ listIndex ] ; } ) ; orderedLists . forEach ( ( list ) => { let newList = normalizeList ( list , false ) ; newList . renderInNavbar ( ) ; } ) ; this . switchToList ( currentListId ) ; StateRenderingModule . showStartPage ( false ) ; }
Initializes the functionality by retrieving all to-do information from the database and rendering it.
Initializes the functionality by retrieving all to - do information from the database and rendering it .
// Render lists in navbar // Sort lists by order // Render current list in list view