Skip to content

Commit

Permalink
chore: update syncMap
Browse files Browse the repository at this point in the history
  • Loading branch information
ynwd committed Dec 3, 2024
1 parent 44e9d8c commit a8fcf3e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
5 changes: 3 additions & 2 deletions core/map/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,10 @@ export class Store<K extends string | number | symbol, V> {
this.map = map;
this.cleanUpExpiredEntries();
await this.commit();
} else {
console.log("debug this.map.size ==>", this.map.size);
return true;
}

return true;
}

private cleanUpExpiredEntries(): void {
Expand Down
2 changes: 1 addition & 1 deletion modules/hook/socket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const useWebSocket = (url: string, room: string, user: string) => {

function ping(data: any) {
const i = setInterval(() => {
if (countRef.current > 1) {
if (countRef.current > 2) {
setIsConnected(true);
return clearInterval(i);
}
Expand Down
12 changes: 9 additions & 3 deletions modules/index/index.navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,14 @@ function Item(props: { data: any }) {
<div
class={`absolute ${
show ? "" : "hidden"
} flex flex-col text-xs mt-[118px] w-full z-10 bg-black border-t border-r border-l border-b rounded-md`}
} flex flex-col justify-end text-xs mt-[10rem] w-full z-10 bg-black border-t border-r border-l border-b rounded-md`}
>
<div
class={`border-b p-3 cursor-pointer`}
onClick={() => handleSeeProfile(props.data)}
>
See Profile
</div>
<div
class={`border-b p-3 cursor-pointer`}
onClick={() => handleSendMessage(props.data)}
Expand All @@ -249,9 +255,9 @@ function Item(props: { data: any }) {
</div>
<div
class={`p-3 cursor-pointer`}
onClick={() => handleSeeProfile(props.data)}
onClick={() => handleSendMessage(props.data)}
>
See Profile
Save Contact
</div>
</div>
</li>
Expand Down

0 comments on commit a8fcf3e

Please sign in to comment.