Merge pull request #10 from mitchemmc/feature/v1.3.2

Feature/v1.3.2
This commit is contained in:
Mitchell McCaffrey 2020-06-07 11:55:35 +10:00 committed by GitHub
commit 9d04f3a5f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 19 additions and 4 deletions

View File

@ -1,6 +1,6 @@
{
"name": "owlbear-rodeo",
"version": "1.3.1",
"version": "1.3.2",
"private": true,
"dependencies": {
"@msgpack/msgpack": "^1.12.1",

View File

@ -55,7 +55,9 @@ export function MapDataProvider({ children }) {
}
async function loadMaps() {
let storedMaps = await database.table("maps").toArray();
let storedMaps = [];
// Use a cursor instead of toArray to prevent IPC max size error
await database.table("maps").each((map) => storedMaps.push(map));
const sortedMaps = storedMaps.sort((a, b) => b.created - a.created);
const defaultMapsWithIds = await getDefaultMaps();
const allMaps = [...sortedMaps, ...defaultMapsWithIds];

View File

@ -30,7 +30,9 @@ export function TokenDataProvider({ children }) {
}
async function loadTokens() {
let storedTokens = await database.table("tokens").toArray();
let storedTokens = [];
// Use a cursor instead of toArray to prevent IPC max size error
await database.table("tokens").each((token) => storedTokens.push(token));
const sortedTokens = storedTokens.sort((a, b) => b.created - a.created);
const defaultTokensWithIds = getDefaultTokes();
const allTokens = [...sortedTokens, ...defaultTokensWithIds];

View File

@ -0,0 +1,7 @@
# v1.3.2
## Minor Changes
- Fixed a bug when loading a large amount of stored maps.
[Reddit]()

View File

@ -51,7 +51,7 @@ function Home() {
Join Game
</Button>
<Text variant="caption" as="p" sx={{ textAlign: "center" }}>
Beta v1.3.1
Beta v1.3.2
</Text>
<Button
m={2}

View File

@ -10,6 +10,7 @@ const v120 = raw("../docs/releaseNotes/v1.2.0.md");
const v121 = raw("../docs/releaseNotes/v1.2.1.md");
const v130 = raw("../docs/releaseNotes/v1.3.0.md");
const v131 = raw("../docs/releaseNotes/v1.3.1.md");
const v132 = raw("../docs/releaseNotes/v1.3.2.md");
function ReleaseNotes() {
return (
@ -32,6 +33,9 @@ function ReleaseNotes() {
<Text mb={2} variant="heading" as="h1" sx={{ fontSize: 5 }}>
Release Notes
</Text>
<div id="v132">
<Markdown source={v132} />
</div>
<div id="v131">
<Markdown source={v131} />
</div>