Add openMessagesLinksOrFilesExternally keybind
This required us to set the media downloaded local path on events entirely from python instead of simply lazy-fetching them when needed from QML, due to pyotherside's async nature and files that must be open in a certain order.
This commit is contained in:
@@ -18,7 +18,7 @@ from .matrix_client import MatrixClient
|
||||
from .media_cache import MediaCache
|
||||
from .models import SyncId
|
||||
from .models.filters import FieldSubstringFilter
|
||||
from .models.items import Account
|
||||
from .models.items import Account, Event
|
||||
from .models.model import Model
|
||||
from .models.model_store import ModelStore
|
||||
from .presence import Presence
|
||||
@@ -86,6 +86,9 @@ class Backend:
|
||||
|
||||
presences: A `{user_id: Presence}` dict for storing presence info about
|
||||
matrix users registered on Mirage.
|
||||
|
||||
mxc_events: A dict storing media `Event` model items for any account
|
||||
that have the same mxc URI
|
||||
"""
|
||||
|
||||
def __init__(self) -> None:
|
||||
@@ -117,6 +120,8 @@ class Backend:
|
||||
|
||||
self.concurrent_get_presence_limit = asyncio.BoundedSemaphore(8)
|
||||
|
||||
self.mxc_events: DefaultDict[str, List[Event]] = DefaultDict(list)
|
||||
|
||||
|
||||
def __repr__(self) -> str:
|
||||
return f"{type(self).__name__}(clients={self.clients!r})"
|
||||
|
Reference in New Issue
Block a user