Parse theme from a custom simpler format

This commit is contained in:
miruka
2019-07-23 03:14:02 -04:00
parent cb1b95766c
commit 9397687122
9 changed files with 308 additions and 221 deletions

View File

@@ -3,7 +3,7 @@
import asyncio
import random
from typing import Any, Dict, Optional, Set, Tuple
from typing import Dict, Optional, Set, Tuple
from .app import App
from .events import users
@@ -104,8 +104,13 @@ class Backend:
# General functions
async def load_settings(self) -> Tuple[Dict[str, Any], ...]:
return (await self.ui_settings.read(), await self.ui_state.read())
async def load_settings(self) -> tuple:
from .config_files import Theme
settings = await self.ui_settings.read()
ui_state = await self.ui_state.read()
theme = await Theme(self, settings["theme"]).read()
return (settings, ui_state, theme)
async def request_user_update_event(self, user_id: str) -> None: