From bc64e20ebded42bd4f088dfb8dae24bbbf8edf12 Mon Sep 17 00:00:00 2001 From: BTMuli Date: Tue, 2 Dec 2025 23:49:05 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=B8=20=E4=BC=98=E5=8C=96=E5=AD=97?= =?UTF-8?q?=E5=85=B8=E5=A4=84=E7=90=86=E9=80=BB=E8=BE=91=EF=BC=8C=E7=A1=AE?= =?UTF-8?q?=E4=BF=9D=E5=AD=97=E5=85=B8=E8=87=B3=E5=B0=91=E5=8C=85=E5=90=AB?= =?UTF-8?q?=E4=B8=A4=E4=B8=AA=E9=94=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src-tauri/src/yae/proto.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src-tauri/src/yae/proto.rs b/src-tauri/src/yae/proto.rs index 62ed0d5d..515c3e3b 100644 --- a/src-tauri/src/yae/proto.rs +++ b/src-tauri/src/yae/proto.rs @@ -140,9 +140,9 @@ pub fn parse_achi_list(bytes: &[u8]) -> Result, DecodeError> { let value = prost::encoding::decode_varint(&mut inner)? as u32; dict.insert(tag, value); } - - if !dict.is_empty() { - dicts.push(dict); + // dict 至少需要两个 key + if dict.len() > 2 { + dicts.push(dict) } } } @@ -155,7 +155,6 @@ pub fn parse_achi_list(bytes: &[u8]) -> Result, DecodeError> { current: d.get(&13).copied().unwrap_or(0), timestamp: d.get(&7).copied().unwrap_or(0), }) - .filter(|a| a.timestamp != 0) .collect(); Ok(achievements)