Skip to content

Commit

Permalink
Merge branch 'main' into shuhui/random-perf
Browse files Browse the repository at this point in the history
  • Loading branch information
shuhuiluo authored Sep 9, 2024
2 parents 1002b51 + 5bf2919 commit bb06174
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 16 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"version": "0.0.60",
"version": "0.0.61",
"packages": ["packages/*", "protocol"],
"npmClient": "yarn"
}
2 changes: 1 addition & 1 deletion packages/dlog/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@river-build/dlog",
"version": "0.0.60",
"version": "0.0.61",
"packageManager": "[email protected]",
"type": "module",
"main": "dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/encryption/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@river-build/encryption",
"version": "0.0.60",
"version": "0.0.61",
"packageManager": "[email protected]",
"type": "module",
"main": "dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@river-build/eslint-config",
"version": "0.0.60",
"version": "0.0.61",
"license": "MIT",
"main": "typescript.js"
}
2 changes: 1 addition & 1 deletion packages/generated/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@river-build/generated",
"version": "0.0.60",
"version": "0.0.61",
"packageManager": "[email protected]",
"scripts": {
"preinstall": "node ./scripts/make-config.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/prettier-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@river-build/prettier-config",
"version": "0.0.60",
"version": "0.0.61",
"license": "MIT",
"main": "config.js",
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/proto/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@river-build/proto",
"version": "0.0.60",
"version": "0.0.61",
"packageManager": "[email protected]",
"type": "module",
"main": "dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@river-build/react-sdk",
"version": "0.0.60",
"version": "0.0.61",
"description": "React Hooks for River SDK",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@river-build/sdk",
"version": "0.0.60",
"version": "0.0.61",
"packageManager": "[email protected]",
"type": "module",
"main": "dist/index.js",
Expand Down
4 changes: 2 additions & 2 deletions packages/sdk/src/sync-agent/spaces/models/channel.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { PlainMessage } from '@bufbuild/protobuf'
import { PersistedObservable, persistedObservable } from '../../../observable/persistedObservable'
import { Identifiable, Store } from '../../../store/store'
import { Identifiable, LoadPriority, Store } from '../../../store/store'
import { RiverConnection } from '../../river-connection/riverConnection'
import { ChannelMessage_Post_Attachment, ChannelMessage_Post_Mention } from '@river-build/proto'
import { Timeline } from '../../timeline/timeline'
Expand Down Expand Up @@ -29,7 +29,7 @@ export class Channel extends PersistedObservable<ChannelModel> {
private spaceDapp: SpaceDapp,
store: Store,
) {
super({ id, spaceId, isJoined: false }, store)
super({ id, spaceId, isJoined: false }, store, LoadPriority.high)
this.timeline = new Timeline(riverConnection.userId)
this.members = new Members(id, riverConnection, store)
}
Expand Down
11 changes: 8 additions & 3 deletions packages/sdk/src/sync-agent/spaces/models/space.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import { check, dlogger } from '@river-build/dlog'
import { isDefined } from '../../../check'
import { makeDefaultChannelStreamId, makeUniqueChannelStreamId } from '../../../id'
import {
isChannelStreamId,
makeDefaultChannelStreamId,
makeUniqueChannelStreamId,
} from '../../../id'
import { PersistedObservable, persistedObservable } from '../../../observable/persistedObservable'
import { Identifiable, Store } from '../../../store/store'
import { Identifiable, LoadPriority, Store } from '../../../store/store'
import { RiverConnection } from '../../river-connection/riverConnection'
import { Channel } from './channel'
import { ethers } from 'ethers'
Expand All @@ -28,7 +32,7 @@ export class Space extends PersistedObservable<SpaceModel> {
store: Store,
private spaceDapp: SpaceDapp,
) {
super({ id, channelIds: [], initialized: false }, store)
super({ id, channelIds: [], initialized: false }, store, LoadPriority.high)
this.channels = {
[makeDefaultChannelStreamId(id)]: new Channel(
makeDefaultChannelStreamId(id),
Expand Down Expand Up @@ -111,6 +115,7 @@ export class Space extends PersistedObservable<SpaceModel> {
}

getChannel(channelId: string): Channel {
check(isChannelStreamId(channelId), 'channelId is not a channel stream id')
if (!this.channels[channelId]) {
this.channels[channelId] = new Channel(
channelId,
Expand Down
2 changes: 1 addition & 1 deletion packages/web3/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@river-build/web3",
"version": "0.0.60",
"version": "0.0.61",
"packageManager": "[email protected]",
"type": "module",
"main": "dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion protocol/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@river-build/proto-source",
"version": "0.0.60",
"version": "0.0.61",
"packageManager": "[email protected]",
"files": [
"*.proto"
Expand Down

0 comments on commit bb06174

Please sign in to comment.