chore: update deps

This commit is contained in:
2025-12-23 10:10:50 +07:00
parent 5b7780ec9b
commit e9e662dccc
15 changed files with 116 additions and 124 deletions

162
Cargo.lock generated
View File

@@ -206,7 +206,7 @@ dependencies = [
"url",
"wayland-backend",
"wayland-client",
"wayland-protocols 0.32.9",
"wayland-protocols",
"zbus",
]
@@ -346,9 +346,9 @@ dependencies = [
[[package]]
name = "async-lock"
version = "3.4.1"
version = "3.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5fd03604047cee9b6ce9de9f70c6cd540a0520c813cbd49bae61f33ab80ed1dc"
checksum = "290f7f2596bd5b78a9fec8088ccd89180d7f9f55b94b0576823bbbdc72ee8311"
dependencies = [
"event-listener 5.4.1",
"event-listener-strategy",
@@ -963,9 +963,9 @@ dependencies = [
[[package]]
name = "cc"
version = "1.2.49"
version = "1.2.50"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "90583009037521a116abf44494efecd645ba48b6622457080f080b85544e2215"
checksum = "9f50d563227a1c37cc0a263f64eca3334388c01c5e4c4861a9def205c614383c"
dependencies = [
"find-msvc-tools",
"jobserver",
@@ -1130,9 +1130,9 @@ dependencies = [
[[package]]
name = "cmake"
version = "0.1.56"
version = "0.1.57"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b042e5d8a74ae91bb0961acd039822472ec99f8ab0948cbf6d1369588f8be586"
checksum = "75443c44cd6b379beb8c5b45d85d0773baf31cce901fe7bb252f4eff3008ef7d"
dependencies = [
"cc",
]
@@ -1211,7 +1211,7 @@ dependencies = [
[[package]]
name = "collections"
version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#975a76bbf09e2b3b0207c2d02947851591500c2f"
source = "git+https://github.com/zed-industries/zed#acee48bfda7b71e1347129bddccfcca85d40b4c7"
dependencies = [
"indexmap",
"rustc-hash 2.1.1",
@@ -1643,7 +1643,7 @@ dependencies = [
[[package]]
name = "derive_refineable"
version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#975a76bbf09e2b3b0207c2d02947851591500c2f"
source = "git+https://github.com/zed-industries/zed#acee48bfda7b71e1347129bddccfcca85d40b4c7"
dependencies = [
"proc-macro2",
"quote",
@@ -1816,7 +1816,7 @@ dependencies = [
"cc",
"memchr",
"rustc_version",
"toml 0.9.8",
"toml 0.9.10+spec-1.1.0",
"vswhom",
"winreg",
]
@@ -2101,9 +2101,9 @@ checksum = "3a3076410a55c90011c298b04d0cfa770b00fa04e1e3c97d3f6c9de105a03844"
[[package]]
name = "flatbuffers"
version = "25.9.23"
version = "25.12.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09b6620799e7340ebd9968d2e0708eb82cf1971e9a16821e2091b6d6e475eed5"
checksum = "35f6839d7b3b98adde531effaf34f0c2badc6f4735d26fe74709d8e513a96ef3"
dependencies = [
"bitflags 2.10.0",
"rustc_version",
@@ -2583,7 +2583,7 @@ dependencies = [
[[package]]
name = "gpui"
version = "0.2.2"
source = "git+https://github.com/zed-industries/zed#975a76bbf09e2b3b0207c2d02947851591500c2f"
source = "git+https://github.com/zed-industries/zed#acee48bfda7b71e1347129bddccfcca85d40b4c7"
dependencies = [
"anyhow",
"as-raw-xcb-connection",
@@ -2665,7 +2665,7 @@ dependencies = [
"wayland-backend",
"wayland-client",
"wayland-cursor",
"wayland-protocols 0.31.2",
"wayland-protocols",
"wayland-protocols-plasma",
"wayland-protocols-wlr",
"windows 0.61.3",
@@ -2683,7 +2683,7 @@ dependencies = [
[[package]]
name = "gpui_macros"
version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#975a76bbf09e2b3b0207c2d02947851591500c2f"
source = "git+https://github.com/zed-industries/zed#acee48bfda7b71e1347129bddccfcca85d40b4c7"
dependencies = [
"heck 0.5.0",
"proc-macro2",
@@ -2694,7 +2694,7 @@ dependencies = [
[[package]]
name = "gpui_tokio"
version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#975a76bbf09e2b3b0207c2d02947851591500c2f"
source = "git+https://github.com/zed-industries/zed#acee48bfda7b71e1347129bddccfcca85d40b4c7"
dependencies = [
"anyhow",
"gpui",
@@ -2916,7 +2916,7 @@ dependencies = [
[[package]]
name = "http_client"
version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#975a76bbf09e2b3b0207c2d02947851591500c2f"
source = "git+https://github.com/zed-industries/zed#acee48bfda7b71e1347129bddccfcca85d40b4c7"
dependencies = [
"anyhow",
"async-compression",
@@ -2941,7 +2941,7 @@ dependencies = [
[[package]]
name = "http_client_tls"
version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#975a76bbf09e2b3b0207c2d02947851591500c2f"
source = "git+https://github.com/zed-industries/zed#acee48bfda7b71e1347129bddccfcca85d40b4c7"
dependencies = [
"rustls",
"rustls-platform-verifier",
@@ -3365,9 +3365,9 @@ dependencies = [
[[package]]
name = "itoa"
version = "1.0.15"
version = "1.0.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c"
checksum = "7ee5b5339afb4c41626dde77b7a611bd4f2c202b897852b4bcf5d03eddc61010"
[[package]]
name = "jni"
@@ -3734,7 +3734,7 @@ dependencies = [
[[package]]
name = "media"
version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#975a76bbf09e2b3b0207c2d02947851591500c2f"
source = "git+https://github.com/zed-industries/zed#acee48bfda7b71e1347129bddccfcca85d40b4c7"
dependencies = [
"anyhow",
"bindgen",
@@ -3984,7 +3984,7 @@ dependencies = [
[[package]]
name = "nostr"
version = "0.44.1"
source = "git+https://github.com/rust-nostr/nostr#577390dd1ffd7bc1fc577a96b9334b7894212dea"
source = "git+https://github.com/rust-nostr/nostr#e09c9d82a1778683d2a6b968d09eb2c619883bf3"
dependencies = [
"aes",
"base64",
@@ -3997,7 +3997,7 @@ dependencies = [
"hex",
"instant",
"once_cell",
"rand 0.8.5",
"rand 0.9.2",
"scrypt",
"secp256k1",
"serde",
@@ -4009,7 +4009,7 @@ dependencies = [
[[package]]
name = "nostr-connect"
version = "0.44.0"
source = "git+https://github.com/rust-nostr/nostr#577390dd1ffd7bc1fc577a96b9334b7894212dea"
source = "git+https://github.com/rust-nostr/nostr#e09c9d82a1778683d2a6b968d09eb2c619883bf3"
dependencies = [
"async-utility",
"nostr",
@@ -4021,7 +4021,7 @@ dependencies = [
[[package]]
name = "nostr-database"
version = "0.44.0"
source = "git+https://github.com/rust-nostr/nostr#577390dd1ffd7bc1fc577a96b9334b7894212dea"
source = "git+https://github.com/rust-nostr/nostr#e09c9d82a1778683d2a6b968d09eb2c619883bf3"
dependencies = [
"btreecap",
"flatbuffers",
@@ -4033,7 +4033,7 @@ dependencies = [
[[package]]
name = "nostr-gossip"
version = "0.44.0"
source = "git+https://github.com/rust-nostr/nostr#577390dd1ffd7bc1fc577a96b9334b7894212dea"
source = "git+https://github.com/rust-nostr/nostr#e09c9d82a1778683d2a6b968d09eb2c619883bf3"
dependencies = [
"nostr",
]
@@ -4041,7 +4041,7 @@ dependencies = [
[[package]]
name = "nostr-lmdb"
version = "0.44.0"
source = "git+https://github.com/rust-nostr/nostr#577390dd1ffd7bc1fc577a96b9334b7894212dea"
source = "git+https://github.com/rust-nostr/nostr#e09c9d82a1778683d2a6b968d09eb2c619883bf3"
dependencies = [
"async-utility",
"flume",
@@ -4055,7 +4055,7 @@ dependencies = [
[[package]]
name = "nostr-relay-pool"
version = "0.44.0"
source = "git+https://github.com/rust-nostr/nostr#577390dd1ffd7bc1fc577a96b9334b7894212dea"
source = "git+https://github.com/rust-nostr/nostr#e09c9d82a1778683d2a6b968d09eb2c619883bf3"
dependencies = [
"async-utility",
"async-wsocket",
@@ -4072,7 +4072,7 @@ dependencies = [
[[package]]
name = "nostr-sdk"
version = "0.44.1"
source = "git+https://github.com/rust-nostr/nostr#577390dd1ffd7bc1fc577a96b9334b7894212dea"
source = "git+https://github.com/rust-nostr/nostr#e09c9d82a1778683d2a6b968d09eb2c619883bf3"
dependencies = [
"async-utility",
"nostr",
@@ -4085,9 +4085,9 @@ dependencies = [
[[package]]
name = "ntapi"
version = "0.4.1"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8a3895c6391c39d7fe7ebc444a87eb2991b2a0bc718fdabd071eec617fc68e4"
checksum = "c70f219e21142367c70c0b30c6a9e3a14d55b4d12a204d897fbec83a0363f081"
dependencies = [
"winapi",
]
@@ -4589,7 +4589,7 @@ checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220"
[[package]]
name = "perf"
version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#975a76bbf09e2b3b0207c2d02947851591500c2f"
source = "git+https://github.com/zed-industries/zed#acee48bfda7b71e1347129bddccfcca85d40b4c7"
dependencies = [
"collections",
"serde",
@@ -4816,7 +4816,7 @@ version = "3.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "219cb19e96be00ab2e37d6e299658a0cfa83e52429179969b0f0121b4ac46983"
dependencies = [
"toml_edit 0.23.9",
"toml_edit 0.23.10+spec-1.0.0",
]
[[package]]
@@ -5061,9 +5061,9 @@ dependencies = [
[[package]]
name = "rangemap"
version = "1.7.0"
version = "1.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "acbbbbea733ec66275512d0b9694f34102e7d5406fdbe2ad8d21b28dce92887c"
checksum = "973443cf09a9c8656b574a866ab68dfa19f0867d0340648c7d2f6a71b8a8ea68"
[[package]]
name = "rav1e"
@@ -5224,7 +5224,7 @@ dependencies = [
[[package]]
name = "refineable"
version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#975a76bbf09e2b3b0207c2d02947851591500c2f"
source = "git+https://github.com/zed-industries/zed#acee48bfda7b71e1347129bddccfcca85d40b4c7"
dependencies = [
"derive_refineable",
]
@@ -5277,9 +5277,9 @@ dependencies = [
[[package]]
name = "reqwest"
version = "0.12.26"
version = "0.12.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3b4c14b2d9afca6a60277086b0cc6a6ae0b568f6f7916c943a8cdc79f8be240f"
checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147"
dependencies = [
"base64",
"bytes",
@@ -5322,7 +5322,7 @@ dependencies = [
[[package]]
name = "reqwest_client"
version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#975a76bbf09e2b3b0207c2d02947851591500c2f"
source = "git+https://github.com/zed-industries/zed#acee48bfda7b71e1347129bddccfcca85d40b4c7"
dependencies = [
"anyhow",
"bytes",
@@ -5376,7 +5376,7 @@ dependencies = [
[[package]]
name = "rope"
version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#975a76bbf09e2b3b0207c2d02947851591500c2f"
source = "git+https://github.com/zed-industries/zed#acee48bfda7b71e1347129bddccfcca85d40b4c7"
dependencies = [
"arrayvec",
"log",
@@ -5579,9 +5579,9 @@ dependencies = [
[[package]]
name = "rustls-pki-types"
version = "1.13.1"
version = "1.13.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "708c0f9d5f54ba0272468c1d306a52c495b31fa155e91bc25371e6df7996908c"
checksum = "21e6f2ab2928ca4291b86736a8bd920a277a399bba1589409d72154ff87c1282"
dependencies = [
"web-time",
"zeroize",
@@ -5669,9 +5669,9 @@ dependencies = [
[[package]]
name = "ryu"
version = "1.0.20"
version = "1.0.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f"
checksum = "62049b2877bf12821e8f9ad256ee38fdc31db7387ec2d3b3f403024de2034aea"
[[package]]
name = "salsa20"
@@ -5902,9 +5902,9 @@ dependencies = [
[[package]]
name = "serde_json"
version = "1.0.145"
version = "1.0.146"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c"
checksum = "217ca874ae0207aac254aa02c957ded05585a90892cc8d87f9e5fa49669dadd8"
dependencies = [
"indexmap",
"itoa",
@@ -5949,9 +5949,9 @@ dependencies = [
[[package]]
name = "serde_spanned"
version = "1.0.3"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e24345aa0fe688594e73770a5f6d1b216508b4f93484c0026d521acd30134392"
checksum = "f8bbf91e5a4d6315eee45e704372590b30e260ee83af6639d64557f51b067776"
dependencies = [
"serde_core",
]
@@ -6293,7 +6293,7 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
[[package]]
name = "sum_tree"
version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#975a76bbf09e2b3b0207c2d02947851591500c2f"
source = "git+https://github.com/zed-industries/zed#acee48bfda7b71e1347129bddccfcca85d40b4c7"
dependencies = [
"arrayvec",
"log",
@@ -6817,14 +6817,14 @@ dependencies = [
[[package]]
name = "toml"
version = "0.9.8"
version = "0.9.10+spec-1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0dc8b1fb61449e27716ec0e1bdf0f6b8f3e8f6b05391e8497b8b6d7804ea6d8"
checksum = "0825052159284a1a8b4d6c0c86cbc801f2da5afd2b225fa548c72f2e74002f48"
dependencies = [
"indexmap",
"serde_core",
"serde_spanned 1.0.3",
"toml_datetime 0.7.3",
"serde_spanned 1.0.4",
"toml_datetime 0.7.5+spec-1.1.0",
"toml_parser",
"toml_writer",
"winnow",
@@ -6841,9 +6841,9 @@ dependencies = [
[[package]]
name = "toml_datetime"
version = "0.7.3"
version = "0.7.5+spec-1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f2cdb639ebbc97961c51720f858597f7f24c4fc295327923af55b74c3c724533"
checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347"
dependencies = [
"serde_core",
]
@@ -6864,21 +6864,21 @@ dependencies = [
[[package]]
name = "toml_edit"
version = "0.23.9"
version = "0.23.10+spec-1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5d7cbc3b4b49633d57a0509303158ca50de80ae32c265093b24c414705807832"
checksum = "84c8b9f757e028cee9fa244aea147aab2a9ec09d5325a9b01e0a49730c2b5269"
dependencies = [
"indexmap",
"toml_datetime 0.7.3",
"toml_datetime 0.7.5+spec-1.1.0",
"toml_parser",
"winnow",
]
[[package]]
name = "toml_parser"
version = "1.0.4"
version = "1.0.6+spec-1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c0cbe268d35bdb4bb5a56a2de88d0ad0eb70af5384a99d648cd4b3d04039800e"
checksum = "a3198b4b0a8e11f09dd03e133c0280504d0801269e9afa46362ffde1cbeebf44"
dependencies = [
"winnow",
]
@@ -6891,9 +6891,9 @@ checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801"
[[package]]
name = "toml_writer"
version = "1.0.4"
version = "1.0.6+spec-1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "df8b2b54733674ad286d16267dcfc7a71ed5c776e4ac7aa3c3e2561f7c637bf2"
checksum = "ab16f14aed21ee8bfd8ec22513f7287cd4a91aa92e44edfe2c17ddd004e92607"
[[package]]
name = "tower"
@@ -6942,9 +6942,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3"
[[package]]
name = "tracing"
version = "0.1.43"
version = "0.1.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2d15d90a0b5c19378952d479dc858407149d7bb45a14de0142f6c534b16fc647"
checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100"
dependencies = [
"log",
"pin-project-lite",
@@ -6965,9 +6965,9 @@ dependencies = [
[[package]]
name = "tracing-core"
version = "0.1.35"
version = "0.1.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a04e24fab5c89c6a36eb8558c9656f30d81de51dfa4d3b45f26b21d61fa0a6c"
checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a"
dependencies = [
"once_cell",
"valuable",
@@ -7264,7 +7264,7 @@ checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be"
[[package]]
name = "util"
version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#975a76bbf09e2b3b0207c2d02947851591500c2f"
source = "git+https://github.com/zed-industries/zed#acee48bfda7b71e1347129bddccfcca85d40b4c7"
dependencies = [
"anyhow",
"async-fs",
@@ -7300,7 +7300,7 @@ dependencies = [
[[package]]
name = "util_macros"
version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#975a76bbf09e2b3b0207c2d02947851591500c2f"
source = "git+https://github.com/zed-industries/zed#acee48bfda7b71e1347129bddccfcca85d40b4c7"
dependencies = [
"perf",
"quote",
@@ -7559,18 +7559,6 @@ dependencies = [
"xcursor",
]
[[package]]
name = "wayland-protocols"
version = "0.31.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f81f365b8b4a97f422ac0e8737c438024b5951734506b0e1d775c73030561f4"
dependencies = [
"bitflags 2.10.0",
"wayland-backend",
"wayland-client",
"wayland-scanner",
]
[[package]]
name = "wayland-protocols"
version = "0.32.9"
@@ -7585,14 +7573,14 @@ dependencies = [
[[package]]
name = "wayland-protocols-plasma"
version = "0.2.0"
version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "23803551115ff9ea9bce586860c5c5a971e360825a0309264102a9495a5ff479"
checksum = "a07a14257c077ab3279987c4f8bb987851bf57081b93710381daea94f2c2c032"
dependencies = [
"bitflags 2.10.0",
"wayland-backend",
"wayland-client",
"wayland-protocols 0.31.2",
"wayland-protocols",
"wayland-scanner",
]
@@ -7605,7 +7593,7 @@ dependencies = [
"bitflags 2.10.0",
"wayland-backend",
"wayland-client",
"wayland-protocols 0.32.9",
"wayland-protocols",
"wayland-scanner",
]
@@ -8787,7 +8775,7 @@ dependencies = [
[[package]]
name = "zlog"
version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#975a76bbf09e2b3b0207c2d02947851591500c2f"
source = "git+https://github.com/zed-industries/zed#acee48bfda7b71e1347129bddccfcca85d40b4c7"
dependencies = [
"anyhow",
"chrono",
@@ -8798,7 +8786,7 @@ dependencies = [
[[package]]
name = "ztracing"
version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#975a76bbf09e2b3b0207c2d02947851591500c2f"
source = "git+https://github.com/zed-industries/zed#acee48bfda7b71e1347129bddccfcca85d40b4c7"
dependencies = [
"tracing",
"tracing-subscriber",
@@ -8809,7 +8797,7 @@ dependencies = [
[[package]]
name = "ztracing_macro"
version = "0.1.0"
source = "git+https://github.com/zed-industries/zed#975a76bbf09e2b3b0207c2d02947851591500c2f"
source = "git+https://github.com/zed-industries/zed#acee48bfda7b71e1347129bddccfcca85d40b4c7"
[[package]]
name = "zune-core"

View File

@@ -151,18 +151,20 @@ impl Sidebar {
let mut results: Vec<Event> = Vec::with_capacity(FIND_LIMIT);
while let Some(event) = stream.next().await {
// Skip if author is match current user
if event.pubkey == public_key {
continue;
}
while let Some((_url, event)) = stream.next().await {
if let Ok(event) = event {
// Skip if author is match current user
if event.pubkey == public_key {
continue;
}
// Skip if the event has already been added
if results.iter().any(|this| this.pubkey == event.pubkey) {
continue;
}
// Skip if the event has already been added
if results.iter().any(|this| this.pubkey == event.pubkey) {
continue;
}
results.push(event);
results.push(event);
}
}
if results.is_empty() {

View File

@@ -77,8 +77,10 @@ impl Screening {
.stream_events_from(BOOTSTRAP_RELAYS, filter, Duration::from_secs(2))
.await
{
while let Some(event) = stream.next().await {
activity = Some(event.created_at);
while let Some((_url, event)) = stream.next().await {
if let Ok(event) = event {
activity = Some(event.created_at);
}
}
}

View File

@@ -309,7 +309,7 @@ impl DockItem {
pub(crate) fn focus_tab_panel(&self, window: &mut Window, cx: &mut App) {
if let DockItem::Tabs { view, .. } = self {
window.focus(&view.read(cx).focus_handle(cx));
window.focus(&view.read(cx).focus_handle(cx), cx);
}
}
}

View File

@@ -898,7 +898,7 @@ impl TabPanel {
fn focus_active_panel(&self, window: &mut Window, cx: &mut Context<Self>) {
if let Some(active_panel) = self.active_panel(cx) {
window.focus(&active_panel.focus_handle(cx));
window.focus(&active_panel.focus_handle(cx), cx);
}
}

View File

@@ -426,8 +426,8 @@ where
self.selected_value.as_ref()
}
pub fn focus(&self, window: &mut Window, _: &mut App) {
self.focus_handle.focus(window);
pub fn focus(&self, window: &mut Window, cx: &mut App) {
self.focus_handle.focus(window, cx);
}
fn on_blur(&mut self, window: &mut Window, cx: &mut Context<Self>) {
@@ -445,7 +445,7 @@ where
return;
}
self.list.focus_handle(cx).focus(window);
self.list.focus_handle(cx).focus(window, cx);
cx.propagate();
}
@@ -454,7 +454,7 @@ where
self.open = true;
}
self.list.focus_handle(cx).focus(window);
self.list.focus_handle(cx).focus(window, cx);
cx.propagate();
}
@@ -466,7 +466,7 @@ where
self.open = true;
cx.notify();
} else {
self.list.focus_handle(cx).focus(window);
self.list.focus_handle(cx).focus(window, cx);
}
}
@@ -475,7 +475,7 @@ where
self.open = !self.open;
if self.open {
self.list.focus_handle(cx).focus(window);
self.list.focus_handle(cx).focus(window, cx);
}
cx.notify();
}

View File

@@ -33,7 +33,7 @@ pub trait FocusableCycle {
.nth(1)
.unwrap_or(fallback_handle);
target_focus_handle.focus(window);
target_focus_handle.focus(window, cx);
cx.stop_propagation();
}
}

View File

@@ -859,7 +859,7 @@ impl Element for TextElement {
let p = point(input_bounds.origin.x, origin.y + offset_y);
for line in lines {
_ = line.paint(p, line_height, window, cx);
_ = line.paint(p, line_height, TextAlign::Left, None, window, cx);
offset_y += line_height;
}
}

View File

@@ -766,7 +766,7 @@ impl InputState {
/// Focus the input field.
pub fn focus(&self, window: &mut Window, cx: &mut Context<Self>) {
self.focus_handle.focus(window);
self.focus_handle.focus(window, cx);
self.blink_cursor.update(cx, |cursor, cx| {
cursor.start(cx);
});

View File

@@ -244,7 +244,7 @@ where
}
pub fn focus(&mut self, window: &mut Window, cx: &mut App) {
self.focus_handle(cx).focus(window);
self.focus_handle(cx).focus(window, cx);
}
/// Set the selected index of the list, this will also scroll to the selected item.

View File

@@ -145,7 +145,7 @@ impl AppMenu {
})
.with_menu_items(items, window, cx)
});
popup_menu.read(cx).focus_handle(cx).focus(window);
popup_menu.read(cx).focus_handle(cx).focus(window, cx);
self._subscription =
Some(cx.subscribe_in(&popup_menu, window, Self::handle_dismiss));
self.popup_menu = Some(popup_menu.clone());
@@ -157,7 +157,7 @@ impl AppMenu {
let focus_handle = popup_menu.read(cx).focus_handle(cx);
if !focus_handle.contains_focused(window, cx) {
focus_handle.focus(window);
focus_handle.focus(window, cx);
}
popup_menu

View File

@@ -156,7 +156,7 @@ impl Element for ContextMenu {
.when_some(menu_view, |this, menu| {
// Focus the menu, so that can be handle the action.
if !menu.focus_handle(cx).contains_focused(window, cx) {
menu.focus_handle(cx).focus(window);
menu.focus_handle(cx).focus(window, cx);
}
this.child(div().occlude().child(menu.clone()))

View File

@@ -659,7 +659,7 @@ impl PopupMenu {
cx: &mut Context<Self>,
) {
if let Some(context) = self.action_context.as_ref() {
context.focus(window);
context.focus(window, cx);
}
window.dispatch_action(action.boxed_clone(), cx);
@@ -759,7 +759,7 @@ impl PopupMenu {
// Focus the submenu, so that can be handle the action.
active_submenu.update(cx, |view, cx| {
view.set_selected_index(0, cx);
view.focus_handle.focus(window);
view.focus_handle.focus(window, cx);
});
cx.notify();
return true;
@@ -790,7 +790,7 @@ impl PopupMenu {
self.selected_index = None;
parent.update(cx, |view, cx| {
view.focus_handle.focus(window);
view.focus_handle.focus(window, cx);
cx.notify();
});
}
@@ -819,7 +819,7 @@ impl PopupMenu {
// Focus back to the previous focused handle.
if let Some(action_context) = self.action_context.as_ref() {
window.focus(action_context);
window.focus(action_context, cx);
}
let Some(parent_menu) = self.parent_menu.clone() else {

View File

@@ -445,7 +445,7 @@ impl<M: ManagedView> Element for Popover<M> {
if let Some(previous_focus_handle) =
previous_focus_handle.as_ref()
{
window.focus(previous_focus_handle);
window.focus(previous_focus_handle, cx);
}
}
*old_content_view1.borrow_mut() = None;
@@ -455,7 +455,7 @@ impl<M: ManagedView> Element for Popover<M> {
)
.detach();
window.focus(&new_content_view.focus_handle(cx));
window.focus(&new_content_view.focus_handle(cx), cx);
*old_content_view.borrow_mut() = Some(new_content_view);
window.refresh();
}

View File

@@ -60,7 +60,7 @@ impl ContextModal for Window {
}
let focus_handle = cx.focus_handle();
focus_handle.focus(window);
focus_handle.focus(window, cx);
root.active_modals.push(ActiveModal {
focus_handle,
@@ -81,7 +81,7 @@ impl ContextModal for Window {
if let Some(top_modal) = root.active_modals.last() {
// Focus the next modal.
top_modal.focus_handle.focus(window);
top_modal.focus_handle.focus(window, cx);
} else {
// Restore focus if there are no more modals.
root.focus_back(window, cx);
@@ -188,9 +188,9 @@ impl Root {
.read(cx)
}
fn focus_back(&mut self, window: &mut Window, _: &mut App) {
fn focus_back(&mut self, window: &mut Window, cx: &mut App) {
if let Some(handle) = self.previous_focus_handle.clone() {
window.focus(&handle);
window.focus(&handle, cx);
}
}