added missing un-read notification

This commit is contained in:
balzack 2023-06-28 22:25:52 -07:00
parent a9b1876ee6
commit 5bb3c851ca
2 changed files with 8 additions and 4 deletions

View File

@ -114,7 +114,7 @@ export function useAppContext() {
updateState({ loggedOut: false });
await addAccount(server, username, password, token);
const session = await setLogin(username, server, password, getApplicationName(), getVersion(), getDeviceId(), deviceToken.current, pushType.current, notifications)
access.current = { server, token: session.appToken, guid: session.guid };
access.current = { loginTimestamp: session.created, server, token: session.appToken, guid: session.guid };
await store.actions.setSession(access.current);
await setSession();
if (session.pushSupported) {
@ -127,7 +127,7 @@ export function useAppContext() {
}
updateState({ loggedOut: false });
const session = await setAccountAccess(server, token, getApplicationName(), getVersion(), getDeviceId(), deviceToken.current, pushType.current, notifications);
access.current = { server, token: session.appToken, guid: session.guid };
access.current = { loginTimestamp: session.created, server, token: session.appToken, guid: session.guid };
await store.actions.setSession(access.current);
await setSession();
if (session.pushSupported) {
@ -141,7 +141,7 @@ export function useAppContext() {
updateState({ loggedOut: false });
const acc = username.split('@');
const session = await setLogin(acc[0], acc[1], password, getApplicationName(), getVersion(), getDeviceId(), deviceToken.current, pushType.current, notifications)
access.current = { server: acc[1], token: session.appToken, guid: session.guid };
access.current = { loginTimestamp: session.created, server: acc[1], token: session.appToken, guid: session.guid };
await store.actions.setSession(access.current);
await setSession();
if (session.pushSupported) {

View File

@ -79,6 +79,11 @@ export function useConversation() {
cardImageUrl = card.actions.getCardImageUrl;
const { logo, subject } = getChannelSubjectLogo(cardId, profileGuid, channel, cards, cardImageUrl);
if (channel?.topicRevision && channel.readRevision !== channel.topicRevision) {
console.log("READ:", channel.topicRevision);
conversation.actions.setChannelReadRevision(channel.topicRevision);
}
const items = Array.from(conversation.state.topics.values());
const sorted = items.sort((a, b) => {
const aTimestamp = a?.detail?.created;
@ -100,7 +105,6 @@ export function useConversation() {
}, 100);
}, [conversation.state, profile.state]);
const actions = {
setFocus: (focus) => {