fix(native): windows 0.61 API paths — repair the CI Windows compile
Build Lotus Chat Desktop / prepare (push) Successful in 5s
Build Lotus Chat Desktop / build-windows (push) Failing after 18m50s
Build Lotus Chat Desktop / build-linux (push) Successful in 23m40s
Build Lotus Chat Desktop / update-manifest (push) Has been skipped

Four unresolved-import/type errors from the release build (first real compile):
- toast.rs: generic IMap moved to the windows-collections crate; read the reply
  from the ValueSet returned by UserInput() directly (HasKey/Lookup are exposed
  on the class).
- jumplist.rs: PROPVARIANT lives in Win32::System::Com::StructuredStorage (not
  windows::core); IObjectArray/IObjectCollection in Win32::System::Com (not
  UI::Shell); PKEY_Title in Win32::Storage::EnhancedStorage (feature added);
  build the title PROPVARIANT via From<&str> (VT_LPWSTR).
- smtc.rs: event registrations return a plain i64 token in windows 0.61 (the
  EventRegistrationToken newtype is gone).
- thumbbar.rs: HICON was imported inside the fn body but used in its signature —
  fully qualify the return type.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-01 21:18:25 -04:00
co-authored by Claude Opus 4.8
parent 89b82f441d
commit 64569f4736
5 changed files with 22 additions and 14 deletions
+5 -2
View File
@@ -186,7 +186,10 @@ enum Glyph {
/// added tooltip-only). `slashed` overlays a transparent diagonal cut to signal
/// the muted / deafened state.
#[cfg(target_os = "windows")]
fn make_icon(glyph: Glyph, slashed: bool) -> Option<HICON> {
fn make_icon(
glyph: Glyph,
slashed: bool,
) -> Option<windows::Win32::UI::WindowsAndMessaging::HICON> {
use windows::core::BOOL;
use windows::Win32::Foundation::COLORREF;
use windows::Win32::Graphics::Gdi::{
@@ -194,7 +197,7 @@ fn make_icon(glyph: Glyph, slashed: bool) -> Option<HICON> {
DeleteDC, DeleteObject, Ellipse, GetDC, LineTo, MoveToEx, ReleaseDC, RoundRect,
SelectObject, BITMAPINFO, BITMAPINFOHEADER, BI_RGB, DIB_RGB_COLORS, PS_SOLID,
};
use windows::Win32::UI::WindowsAndMessaging::{CreateIconIndirect, HICON, ICONINFO};
use windows::Win32::UI::WindowsAndMessaging::{CreateIconIndirect, ICONINFO};
unsafe {
let size = 32i32;