diff --git a/app/mobile/ios/Databag.xcodeproj/project.pbxproj b/app/mobile/ios/Databag.xcodeproj/project.pbxproj index d6343f17..e18215b7 100644 --- a/app/mobile/ios/Databag.xcodeproj/project.pbxproj +++ b/app/mobile/ios/Databag.xcodeproj/project.pbxproj @@ -567,7 +567,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_CXX_LANGUAGE_STANDARD = "c++14"; + CLANG_CXX_LANGUAGE_STANDARD = "c++17"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; @@ -639,7 +639,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_CXX_LANGUAGE_STANDARD = "c++14"; + CLANG_CXX_LANGUAGE_STANDARD = "c++17"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; diff --git a/app/mobile/src/access/admin/Admin.styled.js b/app/mobile/src/access/admin/Admin.styled.js index 1690bae3..6dcdc363 100644 --- a/app/mobile/src/access/admin/Admin.styled.js +++ b/app/mobile/src/access/admin/Admin.styled.js @@ -103,7 +103,7 @@ export const styles = StyleSheet.create({ marginTop: 16, }, logintext: { - color: 'yellow', + color: Colors.primary, }, nologintext: { color: Colors.disabled, diff --git a/app/mobile/src/access/create/Create.styled.js b/app/mobile/src/access/create/Create.styled.js index adff05fa..9519b798 100644 --- a/app/mobile/src/access/create/Create.styled.js +++ b/app/mobile/src/access/create/Create.styled.js @@ -138,7 +138,7 @@ export const styles = StyleSheet.create({ marginBottom: 16, }, logintext: { - color: 'yellow', + color: Colors.primary, }, nologintext: { color: Colors.disabled, diff --git a/app/mobile/src/access/login/Login.styled.js b/app/mobile/src/access/login/Login.styled.js index 1920c8f5..219b5f36 100644 --- a/app/mobile/src/access/login/Login.styled.js +++ b/app/mobile/src/access/login/Login.styled.js @@ -103,7 +103,7 @@ export const styles = StyleSheet.create({ marginTop: 16, }, createtext: { - color: 'yellow', + color: Colors.primary, }, nocreatetext: { color: Colors.disabled, diff --git a/app/mobile/src/access/reset/Reset.styled.js b/app/mobile/src/access/reset/Reset.styled.js index 74984462..e377fe23 100644 --- a/app/mobile/src/access/reset/Reset.styled.js +++ b/app/mobile/src/access/reset/Reset.styled.js @@ -103,7 +103,7 @@ export const styles = StyleSheet.create({ marginTop: 16, }, logintext: { - color: 'yellow', + color: Colors.primary, }, nologintext: { color: Colors.disabled, diff --git a/app/mobile/src/context/useCardContext.hook.js b/app/mobile/src/context/useCardContext.hook.js index 39c49412..ac719ea9 100644 --- a/app/mobile/src/context/useCardContext.hook.js +++ b/app/mobile/src/context/useCardContext.hook.js @@ -186,7 +186,7 @@ export function useCardContext() { catch (err) { console.log(err); entry.offsync = true; - await store.action.setCardItemOffsync(guid, card.id); + await store.actions.setCardItemOffsync(guid, card.id); } } cards.current.set(card.id, { ...entry }); diff --git a/app/mobile/src/context/useChannelContext.hook.js b/app/mobile/src/context/useChannelContext.hook.js index daeddf68..90b2119f 100644 --- a/app/mobile/src/context/useChannelContext.hook.js +++ b/app/mobile/src/context/useChannelContext.hook.js @@ -58,6 +58,7 @@ export function useChannelContext() { }; const sync = async () => { + if (access.current && !syncing.current && setRevision.current !== curRevision.current) { syncing.current = true; try { diff --git a/app/mobile/src/context/useStoreContext.hook.js b/app/mobile/src/context/useStoreContext.hook.js index 83457215..5d3beb27 100644 --- a/app/mobile/src/context/useStoreContext.hook.js +++ b/app/mobile/src/context/useStoreContext.hook.js @@ -1,7 +1,7 @@ import { useEffect, useState, useRef, useContext } from 'react'; import SQLite from "react-native-sqlite-storage"; -const DATABAG_DB = 'db_v090.db'; +const DATABAG_DB = 'db_v_101.db'; export function useStoreContext() { const [state, setState] = useState({}); @@ -168,8 +168,8 @@ export function useStoreContext() { await db.current.executeSql("INSERT OR REPLACE INTO app (key, value) values (?, ?);", [dataId, encodeObject(revision)]); }, setChannelItem: async (guid, channel) => { - const { id, revision, data } = channel; - await db.current.executeSql(`INSERT OR REPLACE INTO channel_${guid} (channel_id, revision, detail_revision, topic_revision, detail, summary, unsealed_detail, unsealed_summary) values (?, ?, ?, ?, ?, ?, null, null);`, [id, revision, detailRevision, topicRevision, encodeObject(channelDetail), encodeObject(channelSummary)]); + const { id, revision, detailRevision, topicRevision, detail, summary } = channel; + await db.current.executeSql(`INSERT OR REPLACE INTO channel_${guid} (channel_id, revision, detail_revision, topic_revision, detail, summary, unsealed_detail, unsealed_summary) values (?, ?, ?, ?, ?, ?, null, null);`, [id, revision, detailRevision, topicRevision, encodeObject(detail), encodeObject(summary)]); }, clearChannelItem: async (guid, channelId) => { await db.current.executeSql(`DELETE FROM channel_${guid} WHERE channel_id=?`, [channelId]); @@ -264,7 +264,7 @@ export function useStoreContext() { setCardChannelItem: async (guid, cardId, channel) => { const { channelId, revision, detailRevision, topicRevision, detail, summary } = channel; - await db.current.executeSql(`INSERT OR REPLACE INTO card_channel_${guid} (card_id, channel_id, revision, detail_revision, topic_revision, detail, summary, unsealed_detail, unsealed_summary) values (?, ?, ?, ?, ?, ?, ?, null, null);`, [cardId, channelId, revision, detailRevision, topicRevision, encodeObject(channelDetail), encodeObject(channelSummary)]); + await db.current.executeSql(`INSERT OR REPLACE INTO card_channel_${guid} (card_id, channel_id, revision, detail_revision, topic_revision, detail, summary, unsealed_detail, unsealed_summary) values (?, ?, ?, ?, ?, ?, ?, null, null);`, [cardId, channelId, revision, detailRevision, topicRevision, encodeObject(detail), encodeObject(summary)]); }, clearCardChannelItem: async (guid, cardId, channelId) => { await db.current.executeSql(`DELETE FROM card_channel_${guid} WHERE card_id=? and channel_id=?`, [cardId, channelId]);