Merge branch 'dev'
This commit is contained in:
commit
ca92abe689
|
@ -132,7 +132,7 @@ class HTMLProcessor:
|
|||
r"(?:/[/\-_.,a-z\d#%&?;=~]*)?(?:\([/\-_.,a-z\d#%&?;=~]*\))?)"),
|
||||
|
||||
# mailto: and tel:
|
||||
r"mailto:(?P<body>[a-z0-9._-]+@(?P<host>[a-z0-9_.-]+[a-z](?:\:\d+)?))",
|
||||
r"mailto:(?P<body>[a-z0-9._-]+@(?P<host>[a-z0-9.-:]*[a-z\d]))",
|
||||
r"tel:(?P<body>[0-9+-]+)(?P<host>)",
|
||||
|
||||
# magnet:
|
||||
|
@ -298,7 +298,7 @@ class HTMLProcessor:
|
|||
"span": {"data-mx-color"},
|
||||
}}
|
||||
|
||||
username_link_regexes = [re.compile(r, re.IGNORECASE) for r in [
|
||||
username_link_regexes = [re.compile(r) for r in [
|
||||
rf"(?<!\w)(?P<body>{re.escape(username)})(?!\w)(?P<host>)"
|
||||
for username in self.rooms_user_id_names[room_id].values()
|
||||
]]
|
||||
|
|
|
@ -269,13 +269,13 @@ class NioCallbacks:
|
|||
# Profile changes
|
||||
changed = []
|
||||
|
||||
if prev and now["avatar_url"] != prev["avatar_url"]:
|
||||
if prev and now.get("avatar_url") != prev.get("avatar_url"):
|
||||
changed.append("profile picture") # TODO: <img>s
|
||||
|
||||
if prev and now["displayname"] != prev["displayname"]:
|
||||
if prev and now.get("displayname") != prev.get("displayname"):
|
||||
changed.append('display name from "{}" to "{}"'.format(
|
||||
prev["displayname"] or ev.state_key,
|
||||
now["displayname"] or ev.state_key,
|
||||
prev.get("displayname") or ev.state_key,
|
||||
now.get("displayname") or ev.state_key,
|
||||
))
|
||||
|
||||
if changed:
|
||||
|
@ -285,8 +285,8 @@ class NioCallbacks:
|
|||
|
||||
if account.profile_updated < ev_date:
|
||||
account.profile_updated = ev_date
|
||||
account.display_name = now["displayname"] or ""
|
||||
account.avatar_url = now["avatar_url"] or ""
|
||||
account.display_name = now.get("displayname") or ""
|
||||
account.avatar_url = now.get("avatar_url") or ""
|
||||
|
||||
if self.client.backend.ui_settings["hideProfileChangeEvents"]:
|
||||
self.client.skipped_events[room.room_id] += 1
|
||||
|
|
|
@ -11,8 +11,10 @@ QtObject {
|
|||
|
||||
|
||||
function onAlertRequested() {
|
||||
if (Qt.application.state !== Qt.ApplicationActive) {
|
||||
window.alert(window.settings.alertOnMessageForMsec)
|
||||
const msec = window.settings.alertOnMessageForMsec
|
||||
|
||||
if (Qt.application.state !== Qt.ApplicationActive && msec !== 0) {
|
||||
window.alert(msec === -1 ? 0 : msec) // -1 → 0 = no time out
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user