diff --git a/app/mobile/src/context/useChannelContext.hook.js b/app/mobile/src/context/useChannelContext.hook.js index a17b92fe..6853e699 100644 --- a/app/mobile/src/context/useChannelContext.hook.js +++ b/app/mobile/src/context/useChannelContext.hook.js @@ -245,11 +245,11 @@ export function useChannelContext() { }, setTopicFlag: async (channelId, topicId) => { const { guid } = access.current; - await store.actions.setChannelTopicBlocked(guid, channelId, topicId, true); + await store.actions.setChannelTopicBlocked(guid, channelId, topicId, 1); }, clearTopicFlag: async (channelId, topicId) => { const { guid } = access.current; - await store.actions.setChannelTopicBlocked(guid, channelId, topicId, false); + await store.actions.setChannelTopicBlocked(guid, channelId, topicId, 0); }, addChannelAlert: async (channelId) => { const { server, guid } = access.current; diff --git a/app/mobile/src/context/useConversationContext.hook.js b/app/mobile/src/context/useConversationContext.hook.js index 6c7e9527..d0fd0baf 100644 --- a/app/mobile/src/context/useConversationContext.hook.js +++ b/app/mobile/src/context/useConversationContext.hook.js @@ -315,7 +315,8 @@ export function useConversationContext() { else if (channelId) { channel.actions.setTopicFlag(channelId, topicId); } - setTopicField(topicId, 'blocked', true); + setTopicField(topicId, 'blocked', 1); + updateState({ topics: topics.current }); }, clearTopicFlag: async (topicId) => { const { cardId, channelId } = conversationId.current || {}; @@ -325,7 +326,8 @@ export function useConversationContext() { else if (channelId) { channel.actions.clearTopicFlag(channelId, topicId); } - setTopicField(topicId, 'blocked', false); + setTopicField(topicId, 'blocked', 0); + updateState({ topics: topics.current }); }, getTopicAssetUrl: (topicId, assetId) => { const { cardId, channelId } = conversationId.current || {}; diff --git a/app/mobile/src/session/conversation/useConversation.hook.js b/app/mobile/src/session/conversation/useConversation.hook.js index 1f385ce3..a916283c 100644 --- a/app/mobile/src/session/conversation/useConversation.hook.js +++ b/app/mobile/src/session/conversation/useConversation.hook.js @@ -129,6 +129,12 @@ export function useConversation() { } } }, + reportTopic: async (topicId) => { + await conversation.actions.addTopicAlert(topicId); + }, + blockTopic: async (topicId) => { + await conversation.actions.setTopicFlag(topicId); + }, removeTopic: async (topicId) => { await conversation.actions.removeTopic(topicId); }, diff --git a/app/mobile/src/session/profile/blockedMessages/useBlockedMessages.hook.js b/app/mobile/src/session/profile/blockedMessages/useBlockedMessages.hook.js index dec98703..23893bf5 100644 --- a/app/mobile/src/session/profile/blockedMessages/useBlockedMessages.hook.js +++ b/app/mobile/src/session/profile/blockedMessages/useBlockedMessages.hook.js @@ -107,7 +107,7 @@ export function useBlockedMessages() { unblock: async (cardId, channelId, topicId) => { const id = `${cardId}:${channelId}:${topicId}`; if (cardId) { - card.actions.clearChannelTopicFlag(cardId, channelId, topicId); + card.actions.clearTopicFlag(cardId, channelId, topicId); } else { channel.actions.clearTopicFlag(channelId, topicId);