mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-22 09:15:33 +03:00
Add more "instance" + saveStatus for new notifications
This commit is contained in:
parent
2afa84c2fd
commit
7b66b832d5
3 changed files with 8 additions and 4 deletions
|
@ -175,7 +175,7 @@ function App() {
|
|||
const notificationStream = useRef();
|
||||
useEffect(() => {
|
||||
if (isLoggedIn && visible) {
|
||||
const { masto } = api();
|
||||
const { masto, instance } = api();
|
||||
(async () => {
|
||||
// 1. Get the latest notification
|
||||
if (states.notificationsLast) {
|
||||
|
@ -200,6 +200,11 @@ function App() {
|
|||
|
||||
notificationStream.current.on('notification', (notification) => {
|
||||
console.log('🔔🔔 Notification', notification);
|
||||
if (notification.status) {
|
||||
saveStatus(notification.status, instance, {
|
||||
skipThreading: true,
|
||||
});
|
||||
}
|
||||
states.notificationsShowNew = true;
|
||||
});
|
||||
|
||||
|
|
|
@ -772,7 +772,7 @@ function Compose({
|
|||
editStatus.id,
|
||||
params,
|
||||
);
|
||||
saveStatus(newStatus, {
|
||||
saveStatus(newStatus, instance, {
|
||||
skipThreading: true,
|
||||
});
|
||||
} else {
|
||||
|
|
|
@ -77,9 +77,8 @@ function Notifications() {
|
|||
|
||||
if (notifications?.length) {
|
||||
notifications.forEach((notification) => {
|
||||
saveStatus(notification.status, {
|
||||
saveStatus(notification.status, instance, {
|
||||
skipThreading: true,
|
||||
override: false,
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue