diff --git a/net/web/src/carousel/Carousel.jsx b/net/web/src/carousel/Carousel.jsx
index 6ab0ea07..15ca6837 100644
--- a/net/web/src/carousel/Carousel.jsx
+++ b/net/web/src/carousel/Carousel.jsx
@@ -134,12 +134,14 @@ export function Carousel({ pad, ready, error, items, itemRenderer, itemRemove })
)}
{ ready && !error && (
-
- {slots}
-
+ <>
+
+ {slots}
+
+
+
+ >
)}
-
-
);
}
diff --git a/net/web/src/carousel/Carousel.styled.js b/net/web/src/carousel/Carousel.styled.js
index 2929eaf6..5c511b49 100644
--- a/net/web/src/carousel/Carousel.styled.js
+++ b/net/web/src/carousel/Carousel.styled.js
@@ -27,6 +27,7 @@ export const CarouselWrapper = styled.div`
justify-content: center;
color: #888888;
background-color: #eeeeee;
+ margin-left: 72px;
}
.carousel::-webkit-scrollbar {
diff --git a/net/web/src/context/useCardContext.hook.js b/net/web/src/context/useCardContext.hook.js
index 990fc67f..fff51706 100644
--- a/net/web/src/context/useCardContext.hook.js
+++ b/net/web/src/context/useCardContext.hook.js
@@ -310,6 +310,13 @@ export function useCardContext() {
else {
await addContactChannelTopic(node, token, channelId, message, files);
}
+ try {
+ resync.current.push(cardId);
+ await setCards(null);
+ }
+ catch (err) {
+ console.log(err);
+ }
},
getChannel: (cardId, channelId) => {
let card = cards.current.get(cardId);
diff --git a/net/web/src/context/useChannelContext.hook.js b/net/web/src/context/useChannelContext.hook.js
index b94f1558..90fe4628 100644
--- a/net/web/src/context/useChannelContext.hook.js
+++ b/net/web/src/context/useChannelContext.hook.js
@@ -68,9 +68,14 @@ export function useChannelContext() {
}
const setChannels = async (rev) => {
+ let force = false;
+ if (rev == null) {
+ force = true;
+ rev = revision.current;
+ }
if (next.current == null) {
next.current = rev;
- if (revision.current !== rev) {
+ if (force || revision.current !== rev) {
await updateChannels();
updateState({ init: true, channels: channels.current });
revision.current = rev;
@@ -138,6 +143,12 @@ export function useChannelContext() {
else {
await addChannelTopic(access.current, channelId, message, files);
}
+ try {
+ await setChannels(null);
+ }
+ catch (err) {
+ console.log(err);
+ }
},
getChannel: (channelId) => {
return channels.current.get(channelId);
diff --git a/net/web/src/session/conversation/addTopic/AddTopic.jsx b/net/web/src/session/conversation/addTopic/AddTopic.jsx
index 66692d53..2a5a3bb9 100644
--- a/net/web/src/session/conversation/addTopic/AddTopic.jsx
+++ b/net/web/src/session/conversation/addTopic/AddTopic.jsx
@@ -24,15 +24,17 @@ export function AddTopic({ cardId, channelId }) {
}
const addTopic = async () => {
- try {
- await actions.addTopic();
- }
- catch (err) {
- console.log(err);
- Modal.error({
- title: 'Failed to Post Message',
- content: 'Please try again.',
- });
+ if (state.messageText || state.assets.length) {
+ try {
+ await actions.addTopic();
+ }
+ catch (err) {
+ console.log(err);
+ Modal.error({
+ title: 'Failed to Post Message',
+ content: 'Please try again.',
+ });
+ }
}
};
diff --git a/net/web/src/session/conversation/topicItem/TopicItem.jsx b/net/web/src/session/conversation/topicItem/TopicItem.jsx
index dfe9e077..31012499 100644
--- a/net/web/src/session/conversation/topicItem/TopicItem.jsx
+++ b/net/web/src/session/conversation/topicItem/TopicItem.jsx
@@ -96,26 +96,6 @@ export function TopicItem({ host, topic }) {
return { state.message?.text }
}
- if (!state.confirmed) {
- return (
-
-
-
-
-
-
-
{ name }
-
{ getTime(offset) }
-
-
-
-
-
-
-
- )
- }
-
return (
- { state.assets.length > 0 && (
-
-
+ { !state.confirmed && (
+
+ )}
+ { state.confirmed && (
+
+ { state.assets.length > 0 && (
+
+
+
+ )}
+
+
+
+
+
+
)}
-
-
-
-
-
-
)
}