Separate window urgency hint setting for mentions
This commit is contained in:
parent
ccd2308427
commit
76f0c5626f
@ -15,6 +15,11 @@ and this project adheres to
|
|||||||
- `markRoomReadMsecDelay` setting to configure how long in milliseconds Mirage
|
- `markRoomReadMsecDelay` setting to configure how long in milliseconds Mirage
|
||||||
will wait before marking a focused room as read, defaults to `200`
|
will wait before marking a focused room as read, defaults to `200`
|
||||||
|
|
||||||
|
- `alertOnMentionForMsec` setting separate from `alertOnMessageForMsec`,
|
||||||
|
defaulting to `-1`: will trigger a non-expiring window highlight on
|
||||||
|
messages received that mention your user
|
||||||
|
(the behavior differs depending on desktop environment or window manager)
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- **Unread message/highlight counters**:
|
- **Unread message/highlight counters**:
|
||||||
@ -22,6 +27,9 @@ and this project adheres to
|
|||||||
and respect configured push rules for your account
|
and respect configured push rules for your account
|
||||||
- Read receipts will be sent to the server to mark rooms as read
|
- Read receipts will be sent to the server to mark rooms as read
|
||||||
|
|
||||||
|
- The `alertOnMessageForMsec` setting now defaults to `0`, disabling window
|
||||||
|
highlights for messages not mentioning you
|
||||||
|
|
||||||
- While an E2E key import operation is running, prevent accidentally closing
|
- While an E2E key import operation is running, prevent accidentally closing
|
||||||
the popup by clicking outside of it
|
the popup by clicking outside of it
|
||||||
|
|
||||||
|
@ -1476,4 +1476,5 @@ class MatrixClient(nio.AsyncClient):
|
|||||||
if from_us or await self.event_is_past(ev):
|
if from_us or await self.event_is_past(ev):
|
||||||
return
|
return
|
||||||
|
|
||||||
AlertRequested()
|
mentions_us = HTML.user_id_link_in_html(item.content, self.user_id)
|
||||||
|
AlertRequested(high_importance=mentions_us)
|
||||||
|
@ -41,6 +41,8 @@ class AlertRequested(PyOtherSideEvent):
|
|||||||
flashes the taskbar icon on Windows.
|
flashes the taskbar icon on Windows.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
high_importance: bool = False
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class CoroutineDone(PyOtherSideEvent):
|
class CoroutineDone(PyOtherSideEvent):
|
||||||
|
@ -228,7 +228,8 @@ class UISettings(JSONDataFile):
|
|||||||
return "Ctrl" if platform.system() == "Darwin" else "Alt"
|
return "Ctrl" if platform.system() == "Darwin" else "Alt"
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"alertOnMessageForMsec": 4000,
|
"alertOnMentionForMsec": -1,
|
||||||
|
"alertOnMessageForMsec": 0,
|
||||||
"alwaysCenterRoomHeader": False,
|
"alwaysCenterRoomHeader": False,
|
||||||
"compactMode": False,
|
"compactMode": False,
|
||||||
"clearRoomFilterOnEnter": True,
|
"clearRoomFilterOnEnter": True,
|
||||||
|
@ -10,8 +10,11 @@ QtObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function onAlertRequested() {
|
function onAlertRequested(highImportance) {
|
||||||
const msec = window.settings.alertOnMessageForMsec
|
const msec =
|
||||||
|
highImportance ?
|
||||||
|
window.settings.alertOnMentionForMsec :
|
||||||
|
window.settings.alertOnMessageForMsec
|
||||||
|
|
||||||
if (Qt.application.state !== Qt.ApplicationActive && msec !== 0) {
|
if (Qt.application.state !== Qt.ApplicationActive && msec !== 0) {
|
||||||
window.alert(msec === -1 ? 0 : msec) // -1 → 0 = no time out
|
window.alert(msec === -1 ? 0 : msec) // -1 → 0 = no time out
|
||||||
|
Loading…
x
Reference in New Issue
Block a user