Skip to content

Commit

Permalink
Attempt improve offline behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
guillemcordoba committed Dec 6, 2024
1 parent 449cdb5 commit d4c93f6
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 73 deletions.
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 12 additions & 12 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

112 changes: 56 additions & 56 deletions ui/custom-elements.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,62 +2,6 @@
"schemaVersion": "1.0.0",
"readme": "",
"modules": [
{
"kind": "javascript-module",
"path": "locales/locales.js",
"declarations": [
{
"kind": "variable",
"name": "sourceLocale",
"default": "`en`",
"description": "The locale code that templates in this source code are written in."
},
{
"kind": "variable",
"name": "targetLocales",
"type": {
"text": "array"
},
"default": "[ , ]",
"description": "The other locale codes that this application is localized into. Sorted\nlexicographically."
},
{
"kind": "variable",
"name": "allLocales",
"type": {
"text": "array"
},
"default": "[ `en`, ]",
"description": "All valid project locale codes. Sorted lexicographically."
}
],
"exports": [
{
"kind": "js",
"name": "sourceLocale",
"declaration": {
"name": "sourceLocale",
"module": "locales/locales.js"
}
},
{
"kind": "js",
"name": "targetLocales",
"declaration": {
"name": "targetLocales",
"module": "locales/locales.js"
}
},
{
"kind": "js",
"name": "allLocales",
"declaration": {
"name": "allLocales",
"module": "locales/locales.js"
}
}
]
},
{
"kind": "javascript-module",
"path": "src/context.ts",
Expand Down Expand Up @@ -1182,6 +1126,62 @@
}
]
},
{
"kind": "javascript-module",
"path": "locales/locales.js",
"declarations": [
{
"kind": "variable",
"name": "sourceLocale",
"default": "`en`",
"description": "The locale code that templates in this source code are written in."
},
{
"kind": "variable",
"name": "targetLocales",
"type": {
"text": "array"
},
"default": "[ , ]",
"description": "The other locale codes that this application is localized into. Sorted\nlexicographically."
},
{
"kind": "variable",
"name": "allLocales",
"type": {
"text": "array"
},
"default": "[ `en`, ]",
"description": "All valid project locale codes. Sorted lexicographically."
}
],
"exports": [
{
"kind": "js",
"name": "sourceLocale",
"declaration": {
"name": "sourceLocale",
"module": "locales/locales.js"
}
},
{
"kind": "js",
"name": "targetLocales",
"declaration": {
"name": "targetLocales",
"module": "locales/locales.js"
}
},
{
"kind": "js",
"name": "allLocales",
"declaration": {
"name": "allLocales",
"module": "locales/locales.js"
}
}
]
},
{
"kind": "javascript-module",
"path": "src/elements/all-chats.ts",
Expand Down
2 changes: 1 addition & 1 deletion ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@darksoil-studio/file-storage-zome": "github:darksoil-studio/file-storage#3d2362bed697e62b5e63891189e331bb56567be7&path:ui",
"@darksoil-studio/linked-devices-zome": "github:darksoil-studio/linked-devices-zome#35cd82e0e3172ecaca4d9f8d9cd64ecc932ed388&path:ui",
"@darksoil-studio/notifications-zome": "github:darksoil-studio/notifications-zome#60ece1f60a97722a817f86276f84918125b5731f&path:ui",
"@darksoil-studio/profiles-zome": "github:darksoil-studio/profiles-zome#1a1a945ef301be9f61de3ddfc4190abfe39dbff4&path:ui",
"@darksoil-studio/profiles-zome": "github:darksoil-studio/profiles-zome#f51984762a47f56e7f353bad264cf7b01f54475d&path:ui",
"@holochain/client": "^0.18.0-rc",
"@lit/context": "^1.0.0",
"@lit/localize": "^0.12.0",
Expand Down
2 changes: 1 addition & 1 deletion ui/src/elements/group-chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
import { consume } from '@lit/context';
import { localized, msg, str } from '@lit/localize';
import { mdiArrowLeft, mdiClose, mdiDelete, mdiPencil } from '@mdi/js';
import { SlDialog, SlTextarea } from '@shoelace-style/shoelace';
import { SlDialog } from '@shoelace-style/shoelace';
import '@shoelace-style/shoelace/dist/components/button/button.js';
import '@shoelace-style/shoelace/dist/components/card/card.js';
import '@shoelace-style/shoelace/dist/components/details/details.js';
Expand Down
9 changes: 9 additions & 0 deletions ui/src/messenger-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,15 @@ export class MessengerStore {
public linkedDevicesStore?: LinkedDevicesStore,
) {
this.client.commitMyPendingEncryptedMessages();
setTimeout(() => {
this.client.commitMyPendingEncryptedMessages();
}, 2000);
setTimeout(() => {
this.client.commitMyPendingEncryptedMessages();
}, 10000);
setTimeout(() => {
this.client.commitMyPendingEncryptedMessages();
}, 20000);
if (this.linkedDevicesStore) {
this.linkedDevicesStore.client.onSignal(signal => {
if (
Expand Down

0 comments on commit d4c93f6

Please sign in to comment.