mirror of
https://github.com/balzack/databag.git
synced 2025-03-13 00:50:03 +00:00
added missing un-read notification
This commit is contained in:
parent
a9b1876ee6
commit
5bb3c851ca
@ -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) {
|
||||
|
@ -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) => {
|
||||
|
Loading…
Reference in New Issue
Block a user