fix ndk cache

This commit is contained in:
Ren Amamiya 2023-08-01 07:53:58 +07:00
parent a898e3013f
commit 9941305998
5 changed files with 195 additions and 434 deletions

View File

@ -79,7 +79,7 @@
"@trivago/prettier-plugin-sort-imports": "^4.2.0",
"@types/html-to-text": "^9.0.1",
"@types/node": "^18.17.1",
"@types/react": "^18.2.17",
"@types/react": "^18.2.18",
"@types/react-dom": "^18.2.7",
"@types/youtube-player": "^5.5.7",
"@typescript-eslint/eslint-plugin": "^5.62.0",

File diff suppressed because it is too large Load Diff

View File

@ -135,6 +135,7 @@ fn main() {
.plugin(tauri_plugin_process::init())
.plugin(tauri_plugin_os::init())
.plugin(tauri_plugin_window::init())
.plugin(tauri_plugin_store::Builder::default().build())
.run(tauri::generate_context!())
.expect("error while running tauri application");
}

View File

@ -54,7 +54,9 @@ export function RepliesList({ id }: { id: string }) {
return (
<div className="mt-3">
<div className="mb-2">
<h5 className="text-lg font-semibold text-zinc-300">{data.length} replies</h5>
<h5 className="text-lg font-semibold text-zinc-300">
{data?.length || 0} replies
</h5>
</div>
<div className="flex flex-col">
{data?.length === 0 ? (
@ -68,7 +70,7 @@ export function RepliesList({ id }: { id: string }) {
</div>
) : (
data
.reverse()
?.reverse()
.map((event: LumeEvent) => <Reply key={event.id} event={event} root={id} />)
)}
</div>

View File

@ -1,5 +1,5 @@
import { removeFile } from '@tauri-apps/plugin-fs';
import { BaseDirectory, appConfigDir } from '@tauri-apps/api/path';
import { removeFile } from '@tauri-apps/plugin-fs';
import { Stronghold } from '@tauri-apps/plugin-stronghold';
const dir = await appConfigDir();
@ -14,7 +14,7 @@ export function useSecureStorage() {
}
const save = async (key: string, value: string, password: string) => {
const stronghold = await Stronghold.load(`${dir}lume.stronghold`, password);
const stronghold = await Stronghold.load(`${dir}/lume.stronghold`, password);
const client = await getClient(stronghold);
const store = client.getStore();
await store.insert(key, Array.from(new TextEncoder().encode(value)));
@ -22,7 +22,7 @@ export function useSecureStorage() {
};
const load = async (key: string, password: string) => {
const stronghold = await Stronghold.load(`${dir}lume.stronghold`, password);
const stronghold = await Stronghold.load(`${dir}/lume.stronghold`, password);
const client = await getClient(stronghold);
const store = client.getStore();
const value = await store.get(key);