correct history order on history page

This commit is contained in:
micialware committed 2026-10-10 19:20:24 +03:00
1 parent 27bdcf41b0
commit 142c2d3d10
3 files changed
+11 -10

No files matched your search

Generated
+8 -8
View File
@@ -2230,7 +2230,7 @@ dependencies = [
"sha2",
"tokio",
"zip",
"zstd 0.14.0",
"zstd 0.14.1",
]
[[package]]
@@ -6485,11 +6485,11 @@ dependencies = [
[[package]]
name = "zstd"
version = "0.14.0"
version = "0.14.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bf06bd8162af0734b344780deb55b42a2429ae430870d13fcc12f238e880fe6e"
checksum = "a4a9ecd0608fac4196ed58e1f337e9a72680fcc9ee449b8bcde6acea680b46f0"
dependencies = [
"zstd-safe 8.0.0",
"zstd-safe 8.1.0",
]
[[package]]
@@ -6503,18 +6503,18 @@ dependencies = [
[[package]]
name = "zstd-safe"
version = "8.0.0"
version = "8.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ae42c0555055784c70058d19ba8e275528e8a99a706684868ace5da4e716a4ab"
checksum = "bdd44c6a7284e91f3717755b24315a302edd9153a01f753c3cba3d765e8eafac"
dependencies = [
"zstd-sys",
]
[[package]]
name = "zstd-sys"
version = "2.1.0+zstd.1.5.7"
version = "2.1.1+zstd.1.5.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ef0a8027ec3ee71300ab3bcbcd0393f434aa72b91ca6d635a39941deae8eea0"
checksum = "aeec9eaf2dffbbd09201e23bd0ffcbaa33bb8e9266a10734fd7ed90a85eca078"
dependencies = [
"cc",
"pkg-config",
+1 -1
View File
@@ -17,7 +17,7 @@ rodio = "0.22.2"
sha2 = "0.11.0"
tokio = { version = "1.53.2", features = ["rt", "rt-multi-thread", "macros"] }
hex = "0.4.3"
zstd = "0.14.0"
zstd = "0.14.1"
zip = "8.6.0"
rfd = "0.17.2"
mimalloc = "0.1.52"
+2 -1
View File
@@ -49,7 +49,7 @@ impl HistoryState {
let history_repo = &mut state.history.write();
history_repo.init().expect("TODO: panic message");
let mut history = history_repo.query(Arc::new(move |h| h.deck_id == id));
let words = history
let mut words: Vec<_> = history
.iter(history_repo)
.map(|item| {
let handle = dict.handle_by_id(item.word_id);
@@ -64,6 +64,7 @@ impl HistoryState {
(word, item.clone())
})
.collect();
words.reverse();
Self { list: words }
}