Skip to content

Commit

Permalink
Merge branch 'feature/chat' of ssh://github.com/anyproto/anytype-ts i…
Browse files Browse the repository at this point in the history
…nto nightly-ci-test
  • Loading branch information
requilence committed Oct 1, 2024
2 parents 97c775f + 9ec9f94 commit 0c279b0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/json/relation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export default {
'targetSpaceId',
'creator',
'createdDate',
'chatId',
'spaceMainChatId'
],

participant: [
Expand Down
6 changes: 3 additions & 3 deletions src/ts/component/widget/buttons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const WidgetButtons = observer(class WidgetSpace extends React.Component<I.Widge
ret.unshift({ id: 'member', name: translate('commonMembers') });
};

if (space.chatId) {
if (space.spaceMainChatId) {
ret.push({ id: 'chat', name: translate('commonMainChat') });
};

Expand All @@ -91,7 +91,7 @@ const WidgetButtons = observer(class WidgetSpace extends React.Component<I.Widge
};

case 'chat': {
U.Object.openAuto({ id: space.chatId, layout: I.ObjectLayout.Chat });
U.Object.openAuto({ id: space.spaceMainChatId, layout: I.ObjectLayout.Chat });
break;
};
};
Expand Down Expand Up @@ -119,4 +119,4 @@ const WidgetButtons = observer(class WidgetSpace extends React.Component<I.Widge

});

export default WidgetButtons;
export default WidgetButtons;
3 changes: 2 additions & 1 deletion src/ts/store/detail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ class DetailStore {
object.writersLimit = Number(object.writersLimit) || 0;
object.sharedSpacesLimit = Number(object.sharedSpacesLimit) || 0;
object.spaceId = Relation.getStringValue(object.spaceId);
object.spaceMainChatId = Relation.getStringValue(object.spaceMainChatId);
object.spaceDashboardId = Relation.getStringValue(object.spaceDashboardId);
object.targetSpaceId = Relation.getStringValue(object.targetSpaceId);
object.iconOption = Number(object.iconOption) || 1;
Expand Down Expand Up @@ -344,4 +345,4 @@ class DetailStore {

};

export const Detail: DetailStore = new DetailStore();
export const Detail: DetailStore = new DetailStore();

0 comments on commit 0c279b0

Please sign in to comment.