huge refactor of the entire codebase, with the goal of improving maintainability, readability, and extensibility. This commit includes changes to almost every file in the project, including:
This commit is contained in:
@@ -8,6 +8,7 @@ from textual.screen import ModalScreen
|
||||
from textual.widgets import Static, Button, Checkbox, ListView, ListItem
|
||||
from textual import work
|
||||
from rich.text import Text
|
||||
from ProviderCore.registry import get_plugin
|
||||
import logging
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -181,8 +182,9 @@ class MatrixRoomPicker(ModalScreen[List[str]]):
|
||||
@work(thread=True)
|
||||
def _load_rooms_background(self) -> None:
|
||||
try:
|
||||
from Provider.matrix import Matrix
|
||||
provider = Matrix(self.config)
|
||||
provider = get_plugin("matrix", self.config)
|
||||
if provider is None:
|
||||
raise RuntimeError("Matrix plugin unavailable")
|
||||
rooms = provider.list_rooms()
|
||||
self.app.call_from_thread(self._apply_room_results, rooms, None)
|
||||
except Exception as exc:
|
||||
|
||||
Reference in New Issue
Block a user