mirror of
https://github.com/balzack/databag.git
synced 2025-02-14 12:39:17 +00:00
more refactor of webapp channel list
This commit is contained in:
parent
b348e38fd1
commit
f1f652bf64
@ -14,10 +14,6 @@ export function Channels({ open, active }) {
|
||||
open(id);
|
||||
};
|
||||
|
||||
const cancelled = () => {
|
||||
actions.clearShowAdd();
|
||||
}
|
||||
|
||||
return (
|
||||
<ChannelsWrapper>
|
||||
<div class="search">
|
||||
@ -49,8 +45,9 @@ export function Channels({ open, active }) {
|
||||
<Button type="primary" icon={<CommentOutlined />} onClick={actions.setShowAdd}>New Topic</Button>
|
||||
</div>
|
||||
)}
|
||||
<Modal title="New Topic" centered visible={state.showAdd} footer={null}>
|
||||
<AddChannel added={added} cancelled={cancelled} />
|
||||
<Modal title="New Topic" centered visible={state.showAdd} footer={null} destroyOnClose={true}
|
||||
onCancel={actions.clearShowAdd}>
|
||||
<AddChannel added={added} cancelled={actions.clearShowAdd} />
|
||||
</Modal>
|
||||
</ChannelsWrapper>
|
||||
);
|
||||
|
@ -125,6 +125,7 @@ export function useChannels() {
|
||||
item.subject = null;
|
||||
}
|
||||
}
|
||||
|
||||
if (item.subject == null || typeof item.subject !== 'string') {
|
||||
item.subject = item.label;
|
||||
}
|
||||
@ -178,10 +179,7 @@ export function useChannels() {
|
||||
if (!item) {
|
||||
item = { cardId, channelId };
|
||||
}
|
||||
if (item.detailRevision !== detailRevision ||
|
||||
item.sealKey !== sealKey) {
|
||||
syncChannelDetail(item, cardValue, channelValue);
|
||||
}
|
||||
syncChannelDetail(item, cardValue, channelValue);
|
||||
if (item.topicRevision !== topicRevision ||
|
||||
item.sealKey !== sealKey) {
|
||||
syncChannelSummary(item, channelValue);
|
||||
@ -204,10 +202,7 @@ export function useChannels() {
|
||||
if (!item) {
|
||||
item = { channelId };
|
||||
}
|
||||
if (item.detailRevision !== detailRevision ||
|
||||
item.sealKey !== sealKey) {
|
||||
syncChannelDetail(item, null, channelValue);
|
||||
}
|
||||
syncChannelDetail(item, null, channelValue);
|
||||
if (item.topicRevision !== topicRevision ||
|
||||
item.sealKey !== sealKey) {
|
||||
syncChannelSummary(item, channelValue);
|
||||
|
Loading…
Reference in New Issue
Block a user