Skip to content

Commit

Permalink
adjusting sql query to avoid error on some devices
Browse files Browse the repository at this point in the history
  • Loading branch information
rolandosborne committed Jul 21, 2023
1 parent f795a32 commit ede54b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/mobile/src/context/useStoreContext.hook.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ export function useStoreContext() {
},
setChannelTopicItem: async (guid, channelId, topic) => {
const { topicId, revision, detailRevision, detail } = topic;
await db.current.executeSql(`INSERT OR REPLACE INTO channel_topic_${guid} (channel_id, topic_id, revision, created, detail_revision, blocked, detail, unsealed_detail) values (?, ?, ?, ?, ?, false, ?, null);`, [channelId, topicId, revision, detail?.created, detailRevision, encodeObject(detail)]);
await db.current.executeSql(`INSERT OR REPLACE INTO channel_topic_${guid} (channel_id, topic_id, revision, created, detail_revision, blocked, detail, unsealed_detail) values (?, ?, ?, ?, ?, ?, ?, null);`, [channelId, topicId, revision, detail?.created, detailRevision, false, encodeObject(detail)]);
},
setChannelTopicItemUnsealedDetail: async (guid, channelId, topicId, revision, unsealed) => {
await db.current.executeSql(`UPDATE channel_topic_${guid} set unsealed_detail=? where detail_revision=? AND channel_id=? AND topic_id=?`, [encodeObject(unsealed), revision, channelId, topicId]);
Expand Down

0 comments on commit ede54b1

Please sign in to comment.