Parse theme from a custom simpler format
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user