mirror of
https://github.com/SableClient/Sable.git
synced 2026-11-20 09:01:17 -08:00
Merge pull request #186 from 7w1/in-app-desktop-notifs
disable in app desktop notifs & various metadata changes
This commit is contained in:
13 files changed
+28
-24
No files matched your search
@@ -1,5 +1,5 @@
|
||||
---
|
||||
sable: patch
|
||||
sable: minor
|
||||
---
|
||||
|
||||
Add option to filter user pronouns based on the pronouns language
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
sable: patch
|
||||
sable: minor
|
||||
---
|
||||
|
||||
Added a "Badge Counts for DMs Only" setting: when enabled, unread count numbers only appear on Direct Message room badges; non-DM rooms and spaces show a plain dot instead of a number, even when Show Unread Counts is on.
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
sable: patch
|
||||
sable: minor
|
||||
---
|
||||
|
||||
Added the ability to add descriptions to uploaded files
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
sable: patch
|
||||
sable: minor
|
||||
---
|
||||
|
||||
Fixed in-app notification banners in encrypted rooms showing "Encrypted Message" instead of the actual content. Banners now also render rich text (mentions, inline images) using the same pipeline as the timeline renderer.
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
sable: patch
|
||||
sable: minor
|
||||
---
|
||||
|
||||
You can now remove your own reactions even if you don't have the permission to add new ones, as long as you are able to delete your own events (messages).
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
sable: patch
|
||||
sable: minor
|
||||
---
|
||||
|
||||
Add a method of quickly adding a new text reaction to the latest message, just like emote quick react, using the prefix `+#`
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
sable: patch
|
||||
sable: minor
|
||||
---
|
||||
|
||||
Added two toggles in Settings > Appearance > Identity for disabling rendering room/space fonts and colors.
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
sable: patch
|
||||
sable: minor
|
||||
---
|
||||
|
||||
Added an additional toggle, Show Unread Ping Counts, to override the Show Unread Counts allowing for only pings to have counts.
|
||||
+3
-1
@@ -3,4 +3,6 @@ node_modules
|
||||
package.json
|
||||
package-lock.json
|
||||
LICENSE
|
||||
README.md
|
||||
README.md
|
||||
CHANGELOG.md
|
||||
./changeset
|
||||
@@ -5,7 +5,6 @@ changelog = "CHANGELOG.md"
|
||||
extra_changelog_sections = [
|
||||
{ name = "Documentation", types = ["docs"] },
|
||||
{ name = "Notes", types = ["note"] },
|
||||
{ types = ["patch"], name = "Updates" },
|
||||
]
|
||||
# assets = "marker for GitHub bot" // TODO: add this later once we have assets
|
||||
|
||||
|
||||
@@ -190,18 +190,20 @@ export function SystemNotification() {
|
||||
return (
|
||||
<Box direction="Column" gap="100">
|
||||
<Text size="L400">System & Notifications</Text>
|
||||
<SequenceCard
|
||||
className={SequenceCardStyle}
|
||||
variant="SurfaceVariant"
|
||||
direction="Column"
|
||||
gap="400"
|
||||
>
|
||||
<SettingTile
|
||||
title="In-App Notifications"
|
||||
description="Show a notification banner inside the app when a message arrives."
|
||||
after={<Switch value={showInAppNotifs} onChange={setShowInAppNotifs} />}
|
||||
/>
|
||||
</SequenceCard>
|
||||
{mobileOrTablet() && (
|
||||
<SequenceCard
|
||||
className={SequenceCardStyle}
|
||||
variant="SurfaceVariant"
|
||||
direction="Column"
|
||||
gap="400"
|
||||
>
|
||||
<SettingTile
|
||||
title="Mobile In-App Notifications"
|
||||
description="Show a notification banner inside the app when a message arrives."
|
||||
after={<Switch value={showInAppNotifs} onChange={setShowInAppNotifs} />}
|
||||
/>
|
||||
</SequenceCard>
|
||||
)}
|
||||
{mobileOrTablet() && (
|
||||
<SequenceCard
|
||||
className={SequenceCardStyle}
|
||||
|
||||
@@ -37,6 +37,7 @@ import {
|
||||
} from '$utils/notificationStyle';
|
||||
import { startClient, stopClient } from '$client/initMatrix';
|
||||
import { useClientConfig } from '$hooks/useClientConfig';
|
||||
import { mobileOrTablet } from '$utils/user-agent';
|
||||
|
||||
const log = createLogger('BackgroundNotifications');
|
||||
const isClientReadyForNotifications = (state: SyncState | string | null): boolean =>
|
||||
@@ -281,7 +282,7 @@ export function BackgroundNotifications() {
|
||||
if (document.visibilityState !== 'visible') return;
|
||||
|
||||
// Respect in-app notification setting (read from ref to avoid stale closure)
|
||||
if (!showNotificationsRef.current) return;
|
||||
if (!mobileOrTablet() || !showNotificationsRef.current) return;
|
||||
|
||||
const notificationPayload = buildRoomMessageNotification({
|
||||
roomName: room.name ?? room.getCanonicalAlias() ?? room.roomId,
|
||||
|
||||
@@ -299,7 +299,7 @@ function MessageNotifications() {
|
||||
|
||||
// Page is visible — show the themed in-app notification banner for any
|
||||
// highlighted message (mention / keyword) or loud push rule.
|
||||
if ((isHighlightByRule || loudByRule) && showNotifications) {
|
||||
if (mobileOrTablet() && (isHighlightByRule || loudByRule) && showNotifications) {
|
||||
const isEncryptedRoom = !!getStateEvent(room, StateEvent.RoomEncryption);
|
||||
const avatarMxc =
|
||||
room.getAvatarFallbackMember()?.getMxcAvatarUrl() ?? room.getMxcAvatarUrl();
|
||||
|
||||
Reference in new issue
Block a user